Table of Contents

Class AddressableSceneLoadData

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Represents the data required to load a Unity scene using the Addressables system. Includes scene name, activation behavior, load mode, and post-load callback.

[Serializable]
public class AddressableSceneLoadData
Inheritance
AddressableSceneLoadData
Inherited Members

Constructors

AddressableSceneLoadData(string, Action<Scene>, LoadSceneMode, bool)

Constructs a new AddressableSceneLoadData instance.

public AddressableSceneLoadData(string sceneName, Action<Scene> onSceneLoaded = null, LoadSceneMode loadSceneMode = LoadSceneMode.Additive, bool activateOnLoad = true)

Parameters

sceneName string

The name of the scene to load.

onSceneLoaded Action<Scene>

Callback invoked after scene is loaded (optional).

loadSceneMode LoadSceneMode

The mode to load the scene (default: Additive).

activateOnLoad bool

Whether to activate the scene on load (default: true).

Fields

ActivateOnLoad

If true, sets the scene active when finished loading. If false, loading is blocked until activation.

[Tooltip("Sets the scene active when it finishes loaded. Blocks AddressableAsync loading when false.")]
public bool ActivateOnLoad

Field Value

bool

LoadSceneMode

The mode used to load the scene (Single or Additive).

public LoadSceneMode LoadSceneMode

Field Value

LoadSceneMode

OnSceneLoaded

Optional callback invoked after the scene is loaded.

public Action<Scene> OnSceneLoaded

Field Value

Action<Scene>

SceneName

The name of the scene to load via Addressables.

public string SceneName

Field Value

string

Methods

Equals(object)

Determines whether the specified object is equal to the current instance. Two AddressableSceneLoadData objects are considered equal if their scene names match (ordinal comparison).

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

True if the scene names are equal; otherwise, false.

GetHashCode()

Returns a hash code for this instance based on the scene name.

public override int GetHashCode()

Returns

int

Hash code for the scene name, or 0 if null.