OnLevelWasLoaded deprecation

Hey

I use OnLevelWasLoaded message in my code and I see such warning in 5.4 beta 7 console:

But… there is no SceneManager.onSceneLoaded !
Would be nice to see such warnings when we can properly react on them =)

1 Like

They changed SceneManager.onSceneLoaded to SceneManager.sceneLoaded in some beta.

They need to change that warning.

2 Likes

Ah, thanks, @bdominguezvw !

Totally forgot to check the offline docs, my bad :]
But yeah, that warning should be corrected to avoid such forum posts in future =)

The thing with this, is that i am using it as a

function OnLevelWasLoaded(){
blah blah
}

in a singleton object, so that it would do some stuff whenever a new scene is loaded.
How do you use that now that is in the scene manager?

1 Like

@codestage Are you making a new version of your Anti-Cheat?
It seems the Random.Seed is also deprecated and it throws warnings.

@screenname_taken yeah, this is already addressed in current dev version :wink:
Thanks for the heads up anyways!

Question. Since OnLevelWasLoaded is deperated (in 5.4b15), what should be used instead?

Read the thread maybe?