Animation Stuck on first frame

HI,

Hoping someone could help me with some weird animation / scripting issues I’ve just found.

I load multiple characters mid game with something like resourceRequest RR = resources.loadasync(Path), I also load their weapons & Animation controllers this way.

Once they’re all loaded I instantiate as gameobjects and stick all the component parts together, I then fire off some bools in the animation controllers to give them some starting animations.

I’ve been running this for a while now but only testing it on one character, much to my surprise when I tried loading two, the first one broke, if I load 3 then the first two both break… so only the final character loaded will function correctly.

By broke, I mean none of the animation will play, the controllers are loaded correctly, the bools are fired and the correct animation has started, but only the first frame and then the model just gets stuck in that frame. If I click around in the controller long enough I can get it to reset, but if I fire off some more animations then it still only plays the first frame and then gets stuck.

There are no error messages anywhere I can see, the models 1 & 2 can be different or the same, as can be the controllers.

Once broken It’s also very difficult to get a character back moving again, even by manually remaking it in the editor. if I remove the animator component then add a new one back in then the problem will persist regardless of which new controller I use.

Has anyone seen anything like this before? As I said at the start I load multiple ResourceRequests in one go, then once they’re all loaded I instantiate them all and stick all the component parts together. I’m not sure if that’s relevant, but it is the last change I made, and I’m sure this used to work…

Thanks for any pointers, it is getting a bit frustrating now…

Well I’ve reworked my code to remove the resourceRequests and loadAsyncs and the problem has gone away…

For some reason it didn’t like the lines of code (Where PL is a custom class and RR is a ResourceRequest that’s part of it.)

PL.RR = Resources.LoadAsync(Path);

and then later

if (PL.RR.isDone == true) { GameObject TempGo = Instantiate(PL.RR.asset) as GameObject ; }

I’d say it’s possible I was doing something wrong with this type of load as I’m not 100% on how it works, but it looks like if you try and request multiple models to be loaded all at the same time, and then once they’ve all loaded instantiate them one after the other, then there was some kind of corruption with all but the last one.

If someone knows why that would be and can point me in the direction of a fix then that would be great, but I don’t think it was actually saving me that much load time anyway… you can’t instantiate asynchronously and that’s 95% of it.