【酷熊科技】工作积累 ----------- unity 动态设置 Animator组件的Controller


 

unity  动态加载 Animator 组件 的Controller

 

public Animator animator; // 直接拖拽,引用

 

string strPath = "FXV2/SoulAnimator/soul_had_animator_" + quality;  // 路径
RuntimeAnimatorController runAnim = (RuntimeAnimatorController) Resources.Load(strPath); // 加载,设置为RuntimeAnimatorController类型
animDiBan.runtimeAnimatorController = runAnim; // 赋值

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM