docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ComponentAddedCriterion

    Criterion for checking that specific Components are added to a GameObject.

    Inheritance
    object
    Object
    ScriptableObject
    Criterion
    ComponentAddedCriterion
    Inherited Members
    Criterion.CriterionCompleted
    Criterion.CriterionInvalidated
    Criterion.Completed
    Criterion.Invalidated
    Criterion.IsCompleted
    Criterion.ResetCompletionState()
    Criterion.isTesting
    Criterion.performedAtLeastOneEvaluationSinceTestingStarted
    Criterion.UpdateCompletion()
    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 ComponentAddedCriterion : Criterion

    Properties

    RequiredComponents

    Returns the required Components.

    Declaration
    public IList<Type> RequiredComponents { get; set; }
    Property Value
    Type Description
    IList<Type>

    TargetGameObject

    Returns the target GameObject.

    Declaration
    public GameObject TargetGameObject { get; set; }
    Property Value
    Type Description
    GameObject

    Methods

    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 the target GameObject have the required component, false otherwise

    Overrides
    Criterion.EvaluateCompletion()

    GetFutureObjectReferences()

    Returns FutureObjectReference for this Criterion.

    Declaration
    protected override IEnumerable<FutureObjectReference> GetFutureObjectReferences()
    Returns
    Type Description
    IEnumerable<FutureObjectReference>

    The list of FutureObjectReference on the required component

    Overrides
    Criterion.GetFutureObjectReferences()

    OnValidate()

    Destroys unused future reference assets and updates future references.

    Declaration
    protected override void OnValidate()
    Overrides
    Criterion.OnValidate()

    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)