Quantcast
Channel: Answers by "Motionreactor"
Viewing all articles
Browse latest Browse all 32

Answer by Motionreactor

$
0
0

Really simple solution is to make everything in your scene a child of a single GameObject (call it world if you like). Then from this 'world' GameObject you can broadcast to all children:

gameObject.BroadcastMessage("ReceiverFunction", msg)

and place a simple script in every child you wish to receive the message:

function ReceiverFunction(msg)
{
    //do something with msg
}

Viewing all articles
Browse latest Browse all 32

Trending Articles



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