Add Awake method
Synergiance
The awake method is quite useful in a multitude of ways. It's a fire once method that runs before any fire multiple method, and is a good place to have a behavior validate its properties and set itself up before another behavior tries to interact with it.
This doesn't mean it has to fire right when awake is called normally in Unity, just before any other method has a chance to actually interact with the behavior, including OnEnable, which is a fire multiple method that happens before Start.
Log In
Fax
Merged in a post:
Expose Awake() in Udon Graph
Uzer Tekton
Awake() is very useful to make sure things are set up before Start(). Sometimes you want to setup stuff that are dependant on other stuff.
For example, if someone wants to save a variable of the player default run speed in their own script, this has to be executed after VRCWorldSettings (the udon graph that is attached by default to the VRCWorld object). Since VRCWorldSettings runs at start, there is no way to set up this initial variable reliably at Start because if it is executed before, it returns 0 instead of the default 4.
Unless there is a reason Awake() is not exposed? Is it because maybe PlayerApi or networking local player are not ready at Awake()?