Teleport Marker doesn't survive scene change
See original GitHub issueOverview
Running a project with multiple scenes, when a new scene is loaded the Mixed Reality Teleport Script loses its reference to the initial instance of Teleport Marker instantiated in the first scene. The Teleport Manager doesn’t survive the scene load and a new one isn’t created in the new scene.
Expected Behavior
No errors, can select using Controller
Actual Behavior
Three errors, xbox controller no longer functions, can’t select or interact
MissingReferenceException: The variable teleportMarker of MixedRealityTeleport doesn't exist anymore.
You probably need to reassign the teleportMarker variable of the 'MixedRealityTeleport' script in the inspector.
HoloToolkit.Unity.InputModule.MixedRealityTeleport.EnableMarker () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:285)
HoloToolkit.Unity.InputModule.MixedRealityTeleport.StartTeleport () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:214)
HoloToolkit.Unity.InputModule.MixedRealityTeleport.HandleGamepad () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:124)
HoloToolkit.Unity.InputModule.MixedRealityTeleport.Update () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:103)
MissingReferenceException: The object of type 'Animator' 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.
HoloToolkit.Unity.InputModule.MixedRealityTeleport.PositionMarker () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:316)
HoloToolkit.Unity.InputModule.MixedRealityTeleport.Update () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:109)
MissingReferenceException: The variable teleportMarker of MixedRealityTeleport doesn't exist anymore.
You probably need to reassign the teleportMarker variable of the 'MixedRealityTeleport' script in the inspector.
HoloToolkit.Unity.InputModule.MixedRealityTeleport.DisableMarker () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:298)
HoloToolkit.Unity.InputModule.MixedRealityTeleport.FinishTeleport () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:236)
HoloToolkit.Unity.InputModule.MixedRealityTeleport.HandleGamepad () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:129)
HoloToolkit.Unity.InputModule.MixedRealityTeleport.Update () (at Assets/HoloToolkit/Input/Scripts/Utilities/Managers/MixedRealityTeleport.cs:103)
Steps to reproduce
Create a project with two scenes. Load initial scene then load second scene. Use xbox left thumbstick.
You can see that the Mixed Reality Teleport Script on MixedRealityCameraParent in the Unity Editor is null.
Unity Editor Version
2017.2.op1-MRTP4
Mixed Reality Toolkit Release Version
master
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Teleport the Player to a different position after scene switch
I am new to the adventure creator and I would like to teleport the Player to a different position after scene switch (not...
Read more >Session Marker gets reset when I "Teleport To"
I was using the tools->session marker->teleport functionality earlier today and it was working. That said, given the quality level of the game, ...
Read more >Teleport a Player to other scene to a specific point
Hi Guys, i have a problem with my change level script. For exampel i have at the moment two scenes worldmap and scene...
Read more >This may sound absurd, because I don't know how to ...
No, the missing component of teleportation is not abrupt and dramatic temperature change. Instead, what is missing is a reliable and safe way...
Read more >Farming Simulator 22 - Easy Development Controls - YouTube
Teleport : Quickly move yourself or vehicles around the map by selecting a ... Advance Growth: Advances all crops to the next growth...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Three options:
Instantiate TeleportMarker as a child of MixedRealityCameraParent. Then doesn’t require DontDestroyOnLoad, but not sure of any implications of tying the position and rotation of the TeleportMaker to the camera.
Make TeleportMarker a Singleton. Will both survive the scene load and will retain the reference in MixedRealityTeleport.
Add some code to handle rewiring the object in MixedRealityTeleport. This could be done either through re Instantiating the TeleportMarker (in which case it doesn’t need DontDestroyOnLoad), or just use Find to grab it and reassociate it (if TeleportMaker has DontDestroyOnLoad).
In MixedRealityTeleport.cs:
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.