0

I create the asset bundle that has my model and animations, but after I fetch the asset bundle from the server I can't control the animations by SetTrigger() so I can see the animator in right place in the model but it doesn't work.

GameObject modelBundle = bundle.LoadAsset<GameObject>(jsonModelName);
modelBundleInstantiate = Instantiate(modelBundle);
//.....
_currentAnaimator = modelBundleInstantiate.GetComponentInChildren<Animator>();
_currentAnaimator.SetTrigger("Next"); // NOT WORK when click the button.
MohammadTofi
  • 365
  • 1
  • 7
  • 22
  • Is `_currentAnaimator` public? Try to make it a public variable in your script / class. Then you can see if the Component is loaded properly. Perhaps `GetComponentInChildren` returns `null` ? Where is the script attached? Why are you searching for the component in children? – dome12b Jun 07 '18 at 13:30
  • I put the _currentAnaimator as public and I make sure the SieveAnalysis(Clone) Animator(model) is correct, but still, I can't move using SetTrigger – MohammadTofi Jun 07 '18 at 15:30

0 Answers0