Warning! OnLoding() method is never called

Monkey Targets Forums/Desktop/Warning! OnLoding() method is never called

GW_(Posted 2011) [#1]
I just realized that for the GLFW target the OnLoading method never gets called. Best to keep your Init stuff out of that method.

I didn't see that mentioned in the docs anywhere.


JD0(Posted 2011) [#2]
I can confirm this happens.

I have also seen that at least with the Flash Target, onloading gets called multiple times. Looks like it is best to keep anything out of there atm.

Edit: I realize now that this is all expected behavior. OnLoading is not guaranteed to be called, or only called once.. so yes keep your setup code out of there!


matt(Posted 2011) [#3]
I think the design is that it will be called repeatedly until every asset is loaded?


JD0(Posted 2011) [#4]
Yeah.. facepalm to myself for not reading the help and just looking at the monkey file.