Forum rules - please read before posting.

Problem with scene transitions

I have encountered a problem upgrading from 1.46d to 1.46f. When I transition from one scene to another both with the adventure creator asset the elements player start, navmesh, and sorting map will not update to the new scenes' elements.
This only happens after the upgrade to 1.46f.

Does anyone know what could had happened ?

Thanks in advance

Comments

  • What version of Unity are you using?
  • edited June 2015
    Unity 5.1.1 is causing problems with Adventure Creator projects, and I am looking into the cause.  Until it is fixed, you'll have to resort to Unity 5.1.0, I'm afraid.  Are you certain that it AC v1.46d was working in Unity 5.1.1f1?

    What platform are you working on, and building to?  It may be that this is platform-specific, as I'm having a hard time recreating this issue on OSX.
  • I am certain that AC v1.46d was working in Unity 5.1.1f1. I made a build Friday and that build works. I upgraded AC today and now it does not.

    I am working on Windows and building for Windows.

    Tell me if I can help you in any way.

    Thanks for the support.

  • edited June 2015

    I managed to find the source of my problem.

    In the file: AdventureCreator\Scripts\Game engine\KickStarter.cs
    Line: Line 643 -> DontDestroyOnLoad (newPlayer);

    If I comment this instructionthe problem is resolved and I can transition between 2 scenes with AC. Does this make sense to you?

    What are the implications of commenting this line?

    Thanks


  • I assume you mean "I can transition between 2 scenes".

    It's a strange one - I can't think of anything that changed between d and f that would affect anything related - though @humaldo is also reporting this error on a Windows machine. 

    Commenting that line out should be a somewhat safe remedy in the meantime - basically it'll mean the player gets rebuilt every scene.  If you aren't resorting to multiple player prefabs, you should be OK for the moment.

    Is your player prefab present in either scene before the game is run?  That may also be a factor.
  • Yes, I can (I correted it).

    The player prefab is not present in either scene before the game is run.


  • OK - I'll let you know if I have more questions, I'm keen to resolve this ASAP.  Thanks
  • OK, new question:

    If you un-comment the line (restoring the script back to how it was), what is the state of the player after the transition?  Is it in the scene at all?  If so, where?  Is it tagged as Player and generally as it should be?  I'm looking for any discernable difference to the GameObject itself that seems to be stopping from being recognised any more.
  • With the original code:
    • In the second scene, the player appears in the playerstart position of the previous scene.
    • If I turn the gizmos on as I play, in the first scene I see the navmesh but in the second scene I dont'.
    It is tagged as player.
    I'm trying to replicate the problem in another project but I can't...

  • I'm sorry to inform you but I messed up...
    The gameobject was inconrectly tagged. The tag player was on the sprite of the player's gameobject and not on the parent gameobject itself.

    I took the liberty of whiping myself 100 times!

    Thanks for the support!
  • Sorry, are you saying that it now works?
  • Fix of this issue verified in AC1.46g and Unity 5.1.1f1 on Win7!
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.