docs.unity3d.com
    Show / Hide Table of Contents

    Class ContextCollection

    Collection of contexts which all share a common set of keys defined in this class.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    ContextCollection
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    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, Boolean)
    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, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.Industrial.Configuring.Core
    Syntax
    [ExecuteInEditMode]
    public class ContextCollection : MonoBehaviour

    Properties

    contexts

    Contexts within this context collection.

    Declaration
    public ReadOnlyCollection<Context> contexts { get; }
    Property Value
    Type Description
    ReadOnlyCollection<Context>

    The contexts.

    keys

    List of keys a context can have.

    Declaration
    public ReadOnlyCollection<string> keys { get; }
    Property Value
    Type Description
    ReadOnlyCollection<String>

    The keys.

    Methods

    AddContext()

    Creates and adds a new context.

    Declaration
    public Context AddContext()
    Returns
    Type Description
    Context

    Context.

    AddKey(String)

    Adds a new key that is then available to all contexts.

    Declaration
    public void AddKey(string key)
    Parameters
    Type Name Description
    String key

    The key.

    Exceptions
    Type Condition
    ArgumentException

    The key must not be null nor contain only whitespaces.

    ArgumentException

    The key is already present.

    GetMaximumCompatibleContext(Context, String, String)

    Returns the context that is a much as possible compatible with the given configuration as possible and has the given value for the given key.

    Declaration
    public Context GetMaximumCompatibleContext(Context context, string key, string value)
    Parameters
    Type Name Description
    Context context

    The context.

    String key

    The key.

    String value

    The value.

    Returns
    Type Description
    Context

    Context.

    Remarks

    Returns

    null
    if no such context exists.

    Exceptions
    Type Condition
    ArgumentNullException

    context must not be null

    ArgumentNullException

    key must not be null.

    ArgumentNullException

    value must not be null.

    ArgumentException
    ArgumentNullException

    context must not be null

    ArgumentNullException

    key must not be null.

    ArgumentNullException

    value must not be null.

    ArgumentNullException

    GetPossibleCompatibleValues(String, Int32, IReadOnlyDictionary<String, String>)

    Returns all possible values for given key based on previous keys.

    Declaration
    public List<string> GetPossibleCompatibleValues(string key, int currentKeyIndex, IReadOnlyDictionary<string, string> prevKeys)
    Parameters
    Type Name Description
    String key

    The key.

    Int32 currentKeyIndex

    Index of the current key.

    IReadOnlyDictionary<String, String> prevKeys

    The previous keys.

    Returns
    Type Description
    List<String>

    List<System.String>.

    Exceptions
    Type Condition
    ArgumentNullException

    key must not be null.

    ArgumentNullException

    prevKeys must not be null.

    ArgumentException
    ArgumentException
    ArgumentNullException

    key must not be null.

    ArgumentException

    prevKeys must not be null.

    ArgumentNullException
    ArgumentException

    GetPossibleValues(String)

    Returns all possible values for given key.

    Declaration
    public List<string> GetPossibleValues(string key)
    Parameters
    Type Name Description
    String key

    The key.

    Returns
    Type Description
    List<String>

    List<System.String>.

    Exceptions
    Type Condition
    ArgumentNullException

    key must not be null.

    ArgumentException

    RemoveContext(Context)

    Removes the given context from the context collection.

    Declaration
    public void RemoveContext(Context context)
    Parameters
    Type Name Description
    Context context

    The context.

    Exceptions
    Type Condition
    ArgumentNullException

    The context must not be null.

    ArgumentException

    The context is not part of the context collection.

    RemoveKey(String)

    Removes a key from the key set.

    Declaration
    public void RemoveKey(string key)
    Parameters
    Type Name Description
    String key

    The key.

    Remarks

    This will remove the respective entries from the contexts in this collection.

    Exceptions
    Type Condition
    ArgumentException

    The key must not be null or contain only whitespaces.

    ArgumentException

    The key is not present.

    Events

    contextCollectionChanged

    Occurs when [context collection changed].

    Declaration
    public event ContextCollectionChangedHandler contextCollectionChanged
    Event Type
    Type Description
    ContextCollectionChangedHandler

    Extension Methods

    Async.StartThrowingCoroutine(MonoBehaviour, IEnumerator, Action<Exception>)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023