SceneHelper - 105-Code/SFS-Modloader GitHub Wiki

SceneHelper

Description

Trigger events related to scene change.

Events

OnBaseSceneLoaded

Fired when the Base Scene (the first scene when game loads) is loaded

// how to suscribe
SceneHelper.OnBaseSceneLoaded += this.MyMethod;

// Method example
void MyMethod(object sender, Scene scene){
  // code here...
}

OnHomeSceneLoaded

Fired when the start menu scene loaded -> After player has gone to another scene and come back

// how to suscribe
SceneHelper.OnHomeSceneLoaded += this.MyMethod;

// Method example
void MyMethod(object sender, Scene scene){
  // code here...
}

OnBuildSceneLoaded

Fired when the Build Scene is loaded

// how to suscribe
SceneHelper.OnBuildSceneLoaded += this.MyMethod;

// Method example
void MyMethod(object sender, Scene scene){
  // code here...
}

OnWorldSceneLoaded

Fired when the World Scene is Loaded

// how to suscribe
SceneHelper.OnWorldSceneLoaded += this.MyMethod;

// Method example
void MyMethod(object sender, Scene scene){
  // code here...
}

OnSceneLoaded

Fired when the any scene is loaded

// how to suscribe
SceneHelper.OnSceneLoaded += this.MyMethod;

// Method example
void MyMethod(object sender, Scene scene){
  // code here...
}

Properties

Name Description
currentScene Get enum with the current scene

Public Methods

There are not public methods for this class.

⚠️ **GitHub.com Fallback** ⚠️