- Home /
This question was
closed Jan 05, 2021 at 10:31 PM by
xSulo for the following reason:
Solved it
Question by
xSulo · Jan 05, 2021 at 05:28 PM ·
instantiatetransformprefabreference
Reference without Transform
Hi everyone! Im currently working on a 2D game and have the problem, that I cant reference the bullet prefab. The gun first has to be picked up by a player, then, when the gun is picked up, it gets the "gunScript". (already done!) Therefore I dont think that it is possible to use Transform and drag the prefab into the script. I already did some research and tried a couple of methods, but without success. Would appreciate any help!
Comment
Answer by Casiell · Jan 05, 2021 at 06:25 PM
Can't it have the gun script from the very beginning?
If not it could at least have a script that only contains a reference to the bullet prefab.