- Home /
Prefab Transform variable missing.
Hello there, I have a prefab and it is an object that it has an attached trigger object collider that if an object (PlayerHand) touches the whole object is attached to PlayerHand.
I have to store "PlayerHand" as a variable (transform) in the script and drag and drop the player hand to that variable (everything works fine).
When I create a prefab and put the whole hierarchy on it I noticed that the "PlayerHand" variable isnt in its script. What can I do to store it in the prefab???
Thanks alot!
Answer by Eric5h5 · Nov 25, 2010 at 12:33 AM
You can't store hierarchy information on a prefab. A prefab is universal and contains no scene-specific information. What would happen if you tried to drag a prefab containing links from one scene into another scene? That wouldn't work at all. A prefab instance can contain scene-specific info though. You can drag the prefab into the scene and link things up that way.
Your answer
Follow this Question
Related Questions
Create Transform from prefab file in a project 4 Answers
Nested Prefab Issue 0 Answers
How to delete a Variable in a script in game 1 Answer
rot not working for 2nd prefab 2 Answers
Assign a 'Transform' target to prefab by finding a 'GameObject' 1 Answer