Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Is it possible to access a GameObject on the scene from a Prefab?

$
0
0
I have a prefab of a bullet (that does not exist on the scene until someone instantiates it) that has a script describing it's behaviour. It's behaviour depends on the wind which is sorted randomly by another script of a GameObject (that already exists on the scene). My problem is that I can't put the GameObject that already exists on the Inspector of the bullet's prefab, so how can I access those informations without unnecessarily creating a bullet when the game starts?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>