Skip to content

SceneEditorUtility

Namespace: SideXP.Core.EditorOnly

public static class SceneEditorUtility

Miscellaneous utility functions for working with Scene and SceneAsset in the editor.

Methods

IsIncluded(Scene)

public static bool IsIncluded(Scene scene)

Checks if a given scene is included in build settings.

Parameters

  • scene: The scene to check.

Returns

Returns true if the given scene is included in build settings, whether it's enabled or not.

IsIncluded(SceneAsset)

public static bool IsIncluded(SceneAsset sceneAsset)

Checks if a given scene is included in build settings.

Parameters

  • sceneAsset: The scene to check.

Returns

Returns true if the given scene is included in build settings, whether it's enabled or not.

IsIncluded(string)

public static bool IsIncluded(string scenePath)

Checks if a given scene is included in build settings.

Parameters

  • scenePath: The path of the scene to check.

Returns

Returns true if the given scene is included in build settings, whether it's enabled or not.

IsEnabled(Scene)

public static bool IsEnabled(Scene scene)

Checks if a given scene is included and enabled in build settings.

Parameters

  • scene: The scene to check.

Returns

Returns true if the given scene is included and enabled in build settings.

IsEnabled(SceneAsset)

public static bool IsEnabled(SceneAsset sceneAsset)

Checks if a given scene is included and enabled in build settings.

Parameters

  • sceneAsset: The scene to check.

Returns

Returns true if the given scene is included and enabled in build settings.

IsEnabled(string)

public static bool IsEnabled(string scenePath)

Checks if a given scene is included and enabled in build settings.

Parameters

  • scenePath: The path of the scene to check.

Returns

Returns true if the given scene is included and enabled in build settings.

AddToBuildSettings(Scene)

public static bool AddToBuildSettings(Scene scene)

Adds a given scene to the build settings, if it's not already registered.

Parameters

  • scene: The scene to add.

Returns

Returns true if the scene has been added to build settings successfully.

AddToBuildSettings(SceneAsset)

public static bool AddToBuildSettings(SceneAsset sceneAsset)

Adds a given scene to the build settings, if it's not already registered.

Parameters

  • sceneAsset: The scene to add.

Returns

Returns true if the scene has been added to build settings successfully.

AddToBuildSettings(string)

public static bool AddToBuildSettings(string scenePath)

Adds a given scene to the build settings, if it's not already registered.

Parameters

  • scenePath: The path of the scene to add.

Returns

Returns true if the scene has been added to build settings successfully.

Enable(Scene)

public static bool Enable(Scene scene)

Enables a given scene in the build settings.

Parameters

  • scene: The scene to enable.

Returns

Returns true if the scene has been enabled successfully or was already enabled.

Enable(SceneAsset)

public static bool Enable(SceneAsset sceneAsset)

Enables a given scene in the build settings.

Parameters

  • sceneAsset: The scene to enable.

Returns

Returns true if the scene has been enabled successfully or was already enabled.

Enable(string)

public static bool Enable(string scenePath)

Enables a given scene in the build settings.

Parameters

  • scenePath: The path of the scene to enable.

Returns

Returns true if the scene has been enabled successfully or was already enabled.

Disable(Scene)

public static bool Disable(Scene scene)

Disables a given scene in the build settings.

Parameters

  • scene: The scene to disable.

Returns

Returns true if the scene has been disabled successfully or was already disabled.

Disable(SceneAsset)

public static bool Disable(SceneAsset sceneAsset)

Disables a given scene in the build settings.

Parameters

  • sceneAsset: The scene to disable.

Returns

Returns true if the scene has been disabled successfully or was already disabled.

Disable(string)

public static bool Disable(string scenePath)

Disables a given scene in the build settings.

Parameters

  • scenePath: The path of the scene to disable.

Returns

Returns true if the scene has been disabled successfully or was already disabled.

RemoveFromBuildSettings(Scene)

public static bool RemoveFromBuildSettings(Scene scene)

Removes a given scene from the build settings.

Parameters

  • scene: The scene to remove.

Returns

Returns true if the scene has been removed from the build settings successfully.

RemoveFromBuildSettings(SceneAsset)

public static bool RemoveFromBuildSettings(SceneAsset sceneAsset)

Removes a given scene from the build settings.

Parameters

  • sceneAsset: The scene to remove.

Returns

Returns true if the scene has been removed from the build settings successfully.

RemoveFromBuildSettings(string)

public static bool RemoveFromBuildSettings(string scenePath)

Removes a given scene from the build settings.

Parameters

  • scenePath: The path of the scene to remove.

Returns

Returns true if the scene has been removed from the build settings successfully.