#hey need your help again on prefabs lmao

1 messages · Page 1 of 1 (latest)

fluid vessel
#

whats up

chilly meadow
#

so, im tryna assign some gameobjects to the prefab but it wont let me

#

im assuming this is not allowed with prefabs?

fluid vessel
#

Control + prtSc

#

then ctrl + v

#

share a screenshot

chilly meadow
#

i know how screenshots work lol

#

give me a sec

fluid vessel
#

could have started with saying what i was asking for lol sorry

chilly meadow
#

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

fluid vessel
#

So you can't drag a player gameobject into the player area?

#

or which one is giving you problems

chilly meadow
#

no

fluid vessel
#

why would the enemy AI script be on a player and an enemy?

chilly meadow
#

its not, the player reference is so that the enemy can follow the player

fluid vessel
#

got you

#

hmm

chilly meadow
#

did a quick google search and it turns out you cant reference scene objects with prefabs

fluid vessel
#

What you would want to do is make a prefab with that script on it

chilly meadow
#

it already has that script on it

fluid vessel
#

So its an ememy prefab?

chilly meadow
#

yes

fluid vessel
#

did you make a player game object

#

not a prefab

chilly meadow
#

yes

fluid vessel
#

can you send a screenshot of your full hierarchy or full workspace

chilly meadow
#

ok

#

dont worry i fixed it

fluid vessel
#

what was the issue

chilly meadow
#

you need to use gameobject.find in the start() function for prefabs

#

you can only reference prefab objects with prefabs, not scene objects]