- Home /
,Cloned TeleportArea not working
I am trying to clone a Teleport Area (from the SteamVR package) using this script (https://docs.unity3d.com/ScriptReference/Object.Instantiate.html). The cloned object appears in my scene hierarchy, but doesn't actually appear in the game.
I can clone other objects just fine, only the TeleportArea isn't working.
Is there some gotcha that has to do with instantiating scripted objects that I should know about?
Answer by nagolinc · Mar 30, 2020 at 10:55 PM
Okay, figured out what the problem was:
In teleport.cs, the line
teleportMarkers = GameObject.FindObjectsOfType<TeleportMarkerBase>();
Is called inside of the start()
function. You will need to update this variable to include your new teleport areas.
Your answer
Follow this Question
Related Questions
How to set initial camera pose with scripts,How to set initial vr camera pose with script 0 Answers
Unity 2018 Steam VR compiling issue 1 Answer
VR Application hangs on Loading Screen, but Renders on main display [SteamVR Plugin] 0 Answers
SteamVR : How to get the transform of controller ? 1 Answer
Change the VR Samples MenuButton script to play animation rather than fade to black and load scene 0 Answers