Forum rules - please read before posting.

Issues with Porting to Unity 5

After a lot of effort I managed to get my game running in Unity 5! Woohoo!

Now starts the fun part where I test what's broken though.

I have some early findings I'd like to share for your kind insight:

A) I was getting a null ref crash in RuntimeActionLists.cs in the foreach around line 63 where the code tries to dereference action.lastResult with action being null.

Should action ever be null there?

In any case I managed to suppress this issue by adding a null guard around that code

(Note I had to do the same a bit further down where the code tries to call action.AssignValues(null))

B) I noticed that none of my animations seem to work anymore. This is for objects that have meccanim animations set up on them. When I inspect these gameobjects they seem fine... their animator components as set up properly and the missing animations are hooked up to the animators as expected. The animations seem to work fine too when previewed in the editor but when the game is running nothing happens. The Mecanim states seem to transition properly too! But the object just sits there static. Really weird issue!

Any suggestions on how to solve either of those issues would be vastly appreciated!



  • A) Are you up-to-date on AC as well?  It's true that you should never get a null Action - I wonder if this is because your ActionList asset was built way, way back when this might have been possible.

    Try copying all the Actions within it into a new ActionList asset (use the ActionList asset to copy them in bulk, since duplicating the file might retain the null Action).

    B) I like how nonchalantly you describe such a serious problem! :)

    The Mecanim states are transitioning when the game is run?  The only similar problem I've come across is with the 3D Demo, in which the "circle wipe" transition that it begins with doesn't animate.  I still haven't gotten to the bottom of that, but it may be related.

    It could well be that it's a bug in Unity, but I haven't found Mecanim in general not working.  You may have some luck asking on the Unity forums.
  • Hi Chris, thanks for the reply!

    A) Yup AC is all up to date too, what you're saying re the age of the asset is very possible, I will try to update the ActionLists when I get the chance. For now I've given up on this endeavor as the WebGL build of the game doesn't seem to work anyway and it looks like it'll be a massive can of worms to figure that out (assuming a solution even exists). And since the whole point of the Unity 5 upgrade, was to try and get it to work in the browser again, it's all a bit moot now.

    B) Yeah I wasn't quite panicking as the data was all still there :) It felt like it was just some minor issue that was blocking things from working somewhere. And it was. The Apply Root Motion setting had somehow been turned on on the offending animators. Turning it off seemed to sort it out.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.