Quantcast
Channel: Latest Questions by jss367
Viewing all articles
Browse latest Browse all 12

How to initialize after Start()

$
0
0
I would like to run another initialize command after Start() but I do not know the best way to do this. I want to do something like this: void Awake() { //Set up the environment } void Start() { // Prepare the variables for the environment } void LateStart() { // Ask the other scripts about their variables } I can't ask the other scripts about their variables until after Start or I will run into a race condition (where whether it errors or not will be based on the sequence the Start() functions are called). I can add a toggle to Update() so the first time it updates it runs the LateStart() commands, but I don't think this is the best way. Any ideas?

Viewing all articles
Browse latest Browse all 12

Trending Articles



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