Forum rules - please read before posting.

Unity 5.6 compatibility

edited April 2017 in Technical Q&A
Hello, I plan to migrate my AC based project to 5.6.
Would it be too early to do this with AC 1.56, or is it considered compatible with U5.6? Thanks.
«1

Comments

  • Hi there,
    I for one am using AC1.56f with Unity 5.6.0f3 and everything works great.

    I would be curious though to know if Chris is planning to make some changes with the new sorting group feature (as now it is possible to reliably use Z-order for sorting sprites)
  • I shall look into it, but for now the focus is on making sure the release is stable and bug-free.

    Using 5.6 should be fine - though if there is an issue of course you can report it here so that it can be taken care of.
  • Thanks, Chris and Ciaps!
  • Hello all - 

    I just updated to Unity 5.6 to fix a particle system+physics system bug that I was running into.  Most everything seems to be working (although I'm getting a ton of new console errors)...however, I have come across a progression blocker.  When loading into a scene from another, I get this:

    MissingReferenceException: The object of type 'Hotspot' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    AC.Hotspot.IsOn () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:584)
    AC.Hotspot.CanDisplayHotspotIcon () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:395)
    AC.Hotspot.UpdateIcon () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:367)
    AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:292)

    If I load this scene directly from Unity, then it loads fine.  If I load the scene before it and have the game load into it, I get this bug and I can't go forward.  Anyone come across this at all?  I haven't changed anything with this scene, so I'm a little confuzzled.
  • Seems related to your Hotspot icons, but I can't recreate the issue.  Are you doing anything out of the ordinary with your Hotspots, or loading your scene without Scene: Switch?

    This'll stop the error and provide feedback, but without knowing the root cause there may be others that follow.  First be sure to use the latest AC, then open Hotspot.cs and find the IsOn function (line 582).  Insert the following at the top (line 584):

    if (gameObject == null) { Debug.Log ("Problematic Hotspot " + name); return false; }

    What effect does that have?
  • So, the only thing that I can think of would be that I am checking to see what Hotspot Interaction type is happening on startup.  I have a global variable to see what mode i'm in: Player Vicinity or MouseOver (MouseOver is used when a certain menu is in play for closeup interactions).  Would it be helpful to see the script that I'm using to switch from Player Vicinity to MouseOver?

    The change that you sent is still hanging up.  Same error:

    MissingReferenceException: The object of type 'Hotspot' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    AC.Hotspot.IsOn () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:584)
    AC.Hotspot.CanDisplayHotspotIcon () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:395)
    AC.Hotspot.UpdateIcon () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:367)
    AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:292)

    Let me know if you want me to shoot you my script on the hotspot interaction method (or if you'd rather me PM it to you).

    Thanks, Chris!

  • At this point I need to know if this is a critical bug with "vanilla" AC or not - if it's a custom script at work we can look to fix it, but first you must try the scene without anything custom on top.  Do this in a duplicate project so that it's easy to revert back afterwards, but as it could be a combination of things that will be the fastest way to determine if the script is influencing it.
  • As for the issue itself, try replacing the code above with:

    if (this == null || gameObject == null) { Debug.Log ("Problematic Hotspot"); return false; }
  • Okay - that updated line of code got it to work.  I'll duplicate my project and remove any additional scripts that are playing if that would still be helpful?
  • Yes please - without knowing the root cause of this issue, there's no way to know if this is a critical bug for all users, or something unique to your project.

    To find that out, comment out the above line of code when testing the duplicate project as well.
  • Okiedoke - 

    I've loaded up, commented out the above line, and removed any script/actionlist on start that I'm using to muck with hotspot interaction mode and I'm still getting the issue.  It does seem to be isolated to loading into this particular scene from another scene, so I'm suspicious that there's something wrong with this specific scene or the transition before it...however, I'm not seeing anything out of the ordinary with how either are set up and it's loading fine if I go directly to the scene and load from there.  It seems to only occur when I load into the scene from another one.  

    Weird.

    I've tried removing any variable/inventory updates when I change the scene from the previous one and removed any OnStart cutscenes for the scene that I'm loading into to see if there's something going on from one scene transition to the other, so it's as vanilla as I can think to make it.

    I am on the latest version of both AC and Unity.
  • OK, thanks for looking into it.  I'll apply the fix to the next release.
  • Rawkin'!  Thanks for the support, Chris!
  • edited April 2017
    Hey all - 

    I've noticed some weirdness with a few of my characters since updating to 5.6 and wondering if anyone else is experiencing the same.  This definitely seems like it's a Unity issue and not AC, but I've been looking around online and can't find it anywhere else.

    There are times when NPCs and/or the player simply don't appear in the scene if I transition from one scene to another.  Oftentimes, if I just press a navigation button then the player will appear where it's supposed to be and everything's fine.  The problems occur if it's a quest-driven NPC.  Sometimes they never show up, so the quest is no longer able to be completed (or in some cases: started).

    I started looking at the console and I did get a warning from the AC debug log that said, "Could not create animation engine!", so I decided to rebuild a couple of NPCs and noticed that when I placed the character controller on that has been working fine, I got this warning: 
    "BlendTree child should not have a speed of 0
    UnityEditor.DockArea:OnGUI()"


    Which is interesting, because nothing is set to zero on this blendtree.  Doubly interesting is that the idle animation never plays.  It's locked on the first frame and is frozen in place.

    Anyone else noticing weirdness with blendtrees in Unity 5.6?  I'll continue to poke around online but thought I'd ask y'all as well.

    Thanks!
    -z
  • PS: Quick update, looks like it's not really based around the blendtree.  I created a new version of the NPC in question and loaded the scene from another scene and the NPC simply isn't being loaded.  The gameobject disappears from the hierarchy when loaded into the scene from another.  Very odd.
  • I'll try to dig around about this issue too (see if I can find some info somewhere), else I may have to report this to Chris. 

    Anyway, was the project working fine in Unity 5.5? If so, it might be a good idea to stay on that version while we find more info. Do try to check if this happens to you in other AC projects (you could make a simple pair of test scenes or even connect the demo to another simple scene and back), this just to make sure it's not something in your Animators or models or some other feature or combination of settings you are currently using in Unity or AC.
  • Could it be somehow related to this? http://www.adventurecreator.org/forum/discussion/6189/unity-crashes-when-i-run-my-game-if-ac-is-on

    A few improvements to the animation system are mentioned in the 5.6 release notes, but nothing that seems to introduce any breaking changes - but the code has been touched, so something important might still have changed.

  • edited April 2017
    @themightyzq ;can you do me a favor and check the following:

    1. when you get the "Could not create animation engine!" log, could you click the text? it should show all the context of the error (in the bottom panel of the Console window). It'll be a bunch of lines referencing script lines, it would be really useful if you could post that here (hopefully it'll return some text as context).

    2. Do you get the error when you use a character with a freshly created, blank or basic animator and animator controller?

    3. You also said the player reappears when you press a navigation button? (I assume, a wsad or the arrow keys or some onscreen controls?). That makes it sound like the player is there but not in the correct position, or outside the screen, (which might be affected by corrupted animations or animations not meant for that specific character). It might not hurt to re-import you animations too.

    4. Related to the same navigation button hint. Also, make sure the NPCs and/or the Player aren't simply being put on the Don't Destroy on Load scene instead (which usually appears at the bottom of the scene hierarchy, but is a separate scene by itself).
  • Heya @Alverik!

    1. So, when I click the text, I only get the following:

    Could not create animation engine!

     -> AC debug logger

    Nothing else shows up in the window.  Is there another location where log files are stored or anything?

    2. I've tried rebuilding the NPC, pulling the animation controller off, and using a different animation controller with this particular NPC to no avail.  I've also tried just pulling the animator off entirely and the gameobject continues to disappear on scene load.

    3. Yeah, the player issue seems to resolve itself although there have also been times where the player is *partly* there with certain chunks of his model missing...and then when I hit the input key (yep, wasd) all models pop into view and he starts walking around.  Now, all of my models/animations come from Mixamo...perhaps there's something wacky going on there.

    4. The player character is showing up on the Don't Destroy on Load scene but the questionable NPC is not.  Hmmmmm...
  • Soooooo...quick update.  Out of curiosity, I went to the Mixamo page and re-exported the NPC in question and re-imported into my project, created an NPC from scratch, and it looks like she's loading in.  So, I'm wondering if the update to 5.6 had some unforeseen update issues with Mixamo characters or something (perhaps an FBX issue or something).  I'll continue to monkey around with this and update the thread as I go...

    Thanks for the assistance, y'all.  I appreciate it.
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.