docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SceneAddedToBuildCriterion

    Criterion for checking that a specific scene is added to the build.

    Inheritance
    object
    Object
    ScriptableObject
    Criterion
    SceneAddedToBuildCriterion
    Inherited Members
    Criterion.CriterionCompleted
    Criterion.CriterionInvalidated
    Criterion.Completed
    Criterion.Invalidated
    Criterion.IsCompleted
    Criterion.ResetCompletionState()
    Criterion.isTesting
    Criterion.performedAtLeastOneEvaluationSinceTestingStarted
    Criterion.UpdateCompletion()
    Criterion.GetFutureObjectReferences()
    Criterion.OnValidate()
    Criterion.CreateFutureObjectReference()
    Criterion.CreateFutureObjectReference(string)
    Criterion.UpdateFutureObjectReferenceNames()
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Tutorials.Core.Editor
    Assembly: Unity.Tutorials.Core.Editor.dll
    Syntax
    public class SceneAddedToBuildCriterion : Criterion

    Properties

    Scene

    The scene that needs to be added to the build.

    Declaration
    public SceneAsset Scene { get; set; }
    Property Value
    Type Description
    SceneAsset

    Methods

    AddSceneToBuildSettings(SceneAsset, bool)

    Adds a Scene to Build Settings.

    Declaration
    public static void AddSceneToBuildSettings(SceneAsset scene, bool enabled = true)
    Parameters
    Type Name Description
    SceneAsset scene

    The SceneAsset to check

    bool enabled

    If true, will add the scene enabled in the BuildSettings, otherwise it's added disabled

    AutoComplete()

    Auto-completes the criterion.

    Declaration
    public override bool AutoComplete()
    Returns
    Type Description
    bool

    True if the auto-completion succeeded.

    Overrides
    Criterion.AutoComplete()

    EvaluateCompletion()

    Evaluates if the criterion is completed.

    Declaration
    protected override bool EvaluateCompletion()
    Returns
    Type Description
    bool

    True if completed

    Overrides
    Criterion.EvaluateCompletion()

    SceneIsAddedToBuildSettings(SceneAsset, bool)

    Is a specific Scene added to Build Settings.

    Declaration
    public static bool SceneIsAddedToBuildSettings(SceneAsset asset, bool forceEnable = false)
    Parameters
    Type Name Description
    SceneAsset asset

    The SceneAsset that need to be checked

    bool forceEnable

    If true, will enable the scene in the BuildSetting if it's not already enabled

    Returns
    Type Description
    bool

    True if the given scene is in the Build Settings

    StartTesting()

    Starts testing of the criterion.

    Declaration
    public override void StartTesting()
    Overrides
    Criterion.StartTesting()

    StopTesting()

    Stops testing of the criterion.

    Declaration
    public override void StopTesting()
    Overrides
    Criterion.StopTesting()
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)