#hey need your help again on prefabs lmao
1 messages · Page 1 of 1 (latest)
so, im tryna assign some gameobjects to the prefab but it wont let me
im assuming this is not allowed with prefabs?
could have started with saying what i was asking for lol sorry
ok so
this is the original gameobject
and this is the prefab
as you can see, not everything is assigned and it wont let me insert it either
if i try to, it does this
So you can't drag a player gameobject into the player area?
or which one is giving you problems
no
this
why would the enemy AI script be on a player and an enemy?
its not, the player reference is so that the enemy can follow the player
did a quick google search and it turns out you cant reference scene objects with prefabs
What you would want to do is make a prefab with that script on it
it already has that script on it
So its an ememy prefab?
yes
yes
can you send a screenshot of your full hierarchy or full workspace
what was the issue
this ^
you need to use gameobject.find in the start() function for prefabs
you can only reference prefab objects with prefabs, not scene objects]