通过assetbundle加载的单独打包AnimatorController使用下面方法赋值

Go.GetComponent<Animator>().runtimeAnimatorController = (RuntimeAnimatorController) obj;


通过Resouce.load 加载的AnimatorController使用

Go.GetComponent<Animator>().runtimeAnimatorController = (RuntimeAnimatorController)RuntimeAnimatorController.Instantiate(obj);


原因是Resouce实际没真正加载资源,而bundle方式资源以及被加载进来了

猜测是Resouce导入的没有引用计数,不会自动clone,而bundle会自动clone,并使用引用计数

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2021-12-30
  • 2021-05-15
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-11-11
相关资源
相似解决方案