Version 3.1.1.0

SceneValidator class

Namespace: Sirenix.OdinInspector.Editor.Validation
Assembly: Sirenix.OdinInspector.Editor
public abstract class SceneValidator : IValidator
Inheritance
  • System.Object
  • SceneValidator

Constructors

SceneValidator()
protected SceneValidator()

Properties

ValidatedScene
public SceneReference ValidatedScene { get; }

Methods

CanValidateScene(SceneReference)
public virtual bool CanValidateScene(SceneReference scene)
Parameters
SceneReference scene

Returns
System.Boolean

GetAllGameObjectsInScene()
public IEnumerable<GameObject> GetAllGameObjectsInScene()
Returns
System.Collections.Generic.IEnumerable<UnityEngine.GameObject>

GetComponentAtPath<T>(IList<String>)
public T GetComponentAtPath<T>(IList<string> path)
    where T : Component
Parameters
System.Collections.Generic.IList<System.String> path

Returns
T

Type Parameters
T

GetComponentAtPath<T>(String, Char)
public T GetComponentAtPath<T>(string path, char pathSeparator = '/')
    where T : Component
Parameters
System.String path

System.Char pathSeparator

Returns
T

Type Parameters
T

GetGameObjectAtPath(IList<String>)
public GameObject GetGameObjectAtPath(IList<string> path)
Parameters
System.Collections.Generic.IList<System.String> path

Returns
UnityEngine.GameObject

GetGameObjectAtPath(String, Char)
public GameObject GetGameObjectAtPath(string path, char pathSeparator = '/')
Parameters
System.String path

System.Char pathSeparator

Returns
UnityEngine.GameObject

GetSceneRoot(String)
public GameObject GetSceneRoot(string name)
Parameters
System.String name

Returns
UnityEngine.GameObject

GetSceneRoots()
public List<GameObject> GetSceneRoots()
Returns
System.Collections.Generic.List<UnityEngine.GameObject>

Initialize()
protected virtual void Initialize()
Initialize(SceneReference)
public void Initialize(SceneReference scene)
Parameters
SceneReference scene

LoadSceneIfNotLoaded(Boolean)
public void LoadSceneIfNotLoaded(bool askToSave = true)
Parameters
System.Boolean askToSave

RunValidation(ref ValidationResult)
public void RunValidation(ref ValidationResult result)
Parameters
ValidationResult result

Validate(ValidationResult)
protected abstract void Validate(ValidationResult result)
Parameters
ValidationResult result