- Home /
Question by
vbl21 · May 27, 2020 at 10:02 AM ·
c#instantiatescript.
Why object created by Instantiate doesn't keep data in attached script
Hi,
I try to create simple "game" where player should put box in propper place. Everythink is working fine until I want to put in propper place clone of my box. I get error: UnassignedReferenceException: The variable BoxPlace of Box has not been assigned. I found in Inspector that there is a difference between Box and Box (clone) created in game - picture in attachment.
Box(clone) is create by simple instruction : Instantiate(Obj, place.position, place.rotation) where place is empty gameobject, just to show where "spawn" place is.
How Can I fix this?
problem.jpg
(169.7 kB)
Comment