- Home /
how to link objects in the inspector on load level
Hello!
I have a space game and I am having trouble going between levels. My game starts in a hanger where you can equip different items, then when you launch the ship and its equipment load into this new level.
The big issue!
Once this new level loads there are some scripts than need linked to the ship object. I can't do this in advance because the ship is not yet in the scene. The only way that it works is if when the level loads in runtime, then pause it and link everything through the inspector, but it does not remember any changes made. I cant just start with the ship in scene due to its previous customization, and I can't just link it to the prefab because unity runs an error saying the link has been disabled from prefab to protect from data corruption.
it doesn't seem like it should be this hard. Please help.
eric
Answer by CoixdeNono · Dec 07, 2012 at 09:43 AM
Try to creat an empty game object and link the items to it, then dontdestroyonload(that_empty_object) so that you keep them to the next level .
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Add force to GameObject 2 Answers
Unity get component help 1 Answer
How to tell if two blocks are right next to each other?(2D) 1 Answer
Is it possible to destroy an object at a specific position? 2 Answers