I have two different spaces in my game: An outside field and an inside room.
And I have divided my game in two scenes.
https://drive.google.com/open?id=1ARBe1cAqcI4rRN60OttG7hxZS7wVJG7O
My player is on Scene 1. And I'm trying to teleport an object in Scene 2.
Can I do that? I can't make it work.
https://drive.google.com/open?id=1hX7VPz0JLPf1AGPoN2G4WJG6MPbAkl3k
I have managed to teleport an obect in the same scene, but never between scenes.
Do I need to simplify my game and merge both scenes in one?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
A global variable that you check on both scenes should do the trick if the player isn't moving between the scenes when the item is to be teleported. Otherwise, have a look at scene surviving action lists.
Thank you Kloot.
I have considered the posibility of introducing a Global Variable.
If I do that... Then I need to place the Teleport action in the "On start Action list", isn it?
I mean, I need to add a pack of actions with a "check variable action list".
Something like: If Variable X is true, teleport this object. If variable X is fals, don't teleport"?
I'm not familiar with "surviving action lists". I'm going to take a look at the forum.
Yes, both of the above methods are viable. Only ActionList assets can survive scene changes, but as @kloot points out this should only be considered if you want the game to physically change scene during this time.
On the "OnStart" method: you'll only need to add an "If X fails, don't teleport" sequence if the object can be teleported back, since it can otherwise just be left in its original position.
Note also that you don't have to call your Variable: Check Action from your OnStart cutscene. You can now create a new Cutscene in your scene, and attach the ActionList Starter component, which is a new feature and can be configured to run the Cutscene when the scene begins. This is effectively the same as assigning it in the Scene Manager's "Cutscene on start" field, but is easier to maintain if you have other such objects to process in there as well.
Thank you Chris, In can work with that. I'm going to investigate those options.
I am also considering the idea of merge both scenes together in one same scene and use camera switching instead scene switching...
Something like this:
https://drive.google.com/open?id=1o4Vii25O-Sc-xNpyFOSLpkl6rmbOhpAX
Right now I have an ugly (2 secconds) loading time between scenes and I'm considering the option of simplify my proyect to one scene. Is that a good option?
Maybe this is a Unity question
I'm very new in Unity and Adventure Creator.
Certainly placing both locations in the same scene and using cameras to cut between them is a viable option. You can also switch between two NavMeshes with the Scene: Change setting Action.
The biggest impact of loading times will be the same causes as any Unity project, i.e. texture sizes etc. See Unity's documentation on optimsation for some general tips, but AC's Manual also has a "Performance and optimisation" chapter for AC-specific notes.
Certainly placing both locations in the same scene and using cameras to cut between them is a viable option. You can also switch between two NavMeshes with the Scene: Change setting Action.
The biggest impact of loading times will be the same causes as any Unity project, i.e. texture sizes etc. See Unity's documentation on optimsation for some general tips, but AC's Manual also has a "Performance and optimisation" chapter for AC-specific notes.
Thank you Chris.
I will take a look al the "Performance and optimisation" chapter also.