SceneManager.sceneLoaded = Il2CppSystem.Delegate.Combine(SceneManager.sceneLoaded, new UnityAction<Scene, LoadSceneMode>(SceneManager.SceneLoaded)).Cast<UnityAction<Scene, LoadSceneMode>>();
into this:
SceneManager.sceneLoaded += new Action<Scene, LoadSceneMode>(OnSceneLoad);
Sadly C# was made by monkeys which can't draw a line between standard library and compiler so these operators don't exist by default.
The language specification asks us to null-check parameters but luckily that's exactly what Delegate.Combine and Delegate.Remove do too.
This allows simplifying code like this:
or:
into this:
Sadly C# was made by monkeys which can't draw a line between standard library and compiler so these operators don't exist by default. The language specification asks us to null-check parameters but luckily that's exactly what Delegate.Combine and Delegate.Remove do too.