Single Scene Processor

This class represents the base processor class that handles the loading and unloading of a single scene. SingleSceneProcessor extends the SceneProcessor class.

Members

  • private SceneLoadingTask _sceneTask:

    • A _sceneTask variable representing the loaded task.

Methods

  1. public SingleSceneProcessor()
    • The constructor method sets the m_loadSceneMode variable to LoadSceneMode.Single.

  2. public override void LoadScene(string sceneName, Action<Scene> onCompleted = null)
    • Parameters:

      • sceneName: The name of the scene to load.

      • onCompleted: The action that will be called when the loading process is completed (defaults to null).

    • It creates the _sceneTask variable containing the settings for the loading process and then initializes the loading process to the base class (SceneProcessor).

  3. public override void UnLoadScene(Scene scene, Action<Scene> onCompleted = null)
    • Parameters:

      • scene: The scene to be evacuated.

      • onCompleted: The action that will be called when the dump is complete (defaults to null).

    • It creates the _sceneTask variable that contains the settings for the offloading process and then instantiates the offloading process to the base class (SceneProcessor).

  4. public override IEnumerator Process()
    • Method that starts processing

    • If _sceneTask is null it terminates the process.

    • If _sceneTask is a loading operation, the method that starts loading _sceneTask is called, otherwise the method that starts unloading is called.

    • When the transaction is completed, the specified action is called and the transaction status is updated.

This class provides a basic structure that manages single scene loading and unloading.

Last updated