Version 3.3.1.2

SceneReference struct

Namespace: Sirenix.OdinInspector.Editor.Validation
Assembly: Sirenix.OdinInspector.Editor
public struct SceneReference : IEquatable<SceneReference>

Constructors

SceneReference(String)
public SceneReference(string guid)
Parameters
System.String guid

SceneReference(Scene)
public SceneReference(Scene scene)
Parameters
UnityEngine.SceneManagement.Scene scene

Fields

GUID
public string GUID
Invalid
public static readonly SceneReference Invalid
IsValid
public bool IsValid

Properties

IsActive
public bool IsActive { get; }
IsLoaded
public bool IsLoaded { get; }
Name
public string Name { get; }
Path
public string Path { get; }

Methods

Equals(SceneReference)
public bool Equals(SceneReference other)
Parameters
SceneReference other

Returns
System.Boolean

Equals(Object)
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

FromAsset(SceneAsset)
public static SceneReference FromAsset(SceneAsset asset)
Parameters
UnityEditor.SceneAsset asset

Returns
SceneReference

FromPath(String)
public static SceneReference FromPath(string path)
Parameters
System.String path

Returns
SceneReference

GetHashCode()
public override int GetHashCode()
Returns
System.Int32

GetSceneAsset()
public SceneAsset GetSceneAsset()
Returns
UnityEditor.SceneAsset

IsInBuildSettings(Boolean)
public bool IsInBuildSettings(bool mustBeEnabled = false)
Parameters
System.Boolean mustBeEnabled

Returns
System.Boolean

TryGetScene(out Scene)
public bool TryGetScene(out Scene scene)
Parameters
UnityEngine.SceneManagement.Scene scene

Returns
System.Boolean

TryOpenScene(OpenSceneMode, out Scene)
public bool TryOpenScene(OpenSceneMode mode, out Scene scene)
Parameters
UnityEditor.SceneManagement.OpenSceneMode mode

UnityEngine.SceneManagement.Scene scene

Returns
System.Boolean

Operators

Equality(SceneReference, SceneReference)
public static bool operator ==(SceneReference a, SceneReference b)
Returns
System.Boolean

Inequality(SceneReference, SceneReference)
public static bool operator !=(SceneReference a, SceneReference b)
Returns
System.Boolean