docs.unity3d.com
    Show / Hide Table of Contents

    Class ConfigurationManager

    The configurator has two main functions:

    All configuration change attempts - namely, variant switching but not staging variant switching - are routed through the ConfigurationManager to the Rule Engine Provider. Once the configuration change has been evaluated by the Rule Engine, the Configuration Manager can dispatch the outcome to either the Switcher (to execute the change) and/or to the Controller/UI (e.g. to refresh the list of available variants).

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    ConfigurationManager
    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.ConfiguratorRuntime
    Syntax
    [ExecuteInEditMode]
    public class ConfigurationManager : MonoBehaviour

    Properties

    configurator

    Configurator to which the configuration manager belongs (must be the parent in the hierarchy).

    Declaration
    public Configurator configurator { get; }
    Property Value
    Type Description
    Configurator

    The configurator.

    Exceptions
    Type Condition
    InvalidOperationException

    The ConfigurationManager must be child to a GameObject with a Configurator component.

    currentConfiguration

    Current configuration.

    Declaration
    public IReadOnlyConfiguration currentConfiguration { get; }
    Property Value
    Type Description
    IReadOnlyConfiguration

    The current configuration.

    Remarks

    The current configuration is not necessarily already applied. Use Switcher to apply a configuration.

    currentConfigurationInternal

    Gets the current configuration internal.

    Declaration
    public Configuration currentConfigurationInternal { get; }
    Property Value
    Type Description
    Configuration

    The current configuration internal.

    currentProduct

    Current product.

    Declaration
    public Product currentProduct { get; }
    Property Value
    Type Description
    Product

    The current product.

    currentProductIndex

    Current product index.

    Declaration
    public int currentProductIndex { get; }
    Property Value
    Type Description
    Int32

    The index of the current product.

    products

    Gets the products.

    Declaration
    public ProductRepository products { get; }
    Property Value
    Type Description
    ProductRepository

    The products.

    Methods

    ApplyDefaultConfiguration()

    Applies the default configuration.

    Declaration
    public void ApplyDefaultConfiguration()

    ApplyVerifiedConfigurationChange(VerifiedConfigurationChange)

    Applies the given verified configuration change to the current configuration and switches it in the variant table.

    Declaration
    public void ApplyVerifiedConfigurationChange(VerifiedConfigurationChange verifiedConfigurationChange)
    Parameters
    Type Name Description
    VerifiedConfigurationChange verifiedConfigurationChange

    The verified configuration change.

    Exceptions
    Type Condition
    ArgumentNullException

    The configuration change must not be null.

    ArgumentException

    The configuration change is not referencing the current configuration.

    ArgumentException

    The configuration change is already stale: the current configuration has already change since the configuration change has been created.

    ArgumentException

    The configuration change must not be null.

    ArgumentException

    The configuration change is not referencing the current configuration.

    Awake()

    Awakes this instance.

    Declaration
    public void Awake()

    GetCurrentDefaultConfiguration()

    Get the current configuration based on the current context.

    Declaration
    public Configuration GetCurrentDefaultConfiguration()
    Returns
    Type Description
    Configuration

    Configuration.

    IsLoading()

    Determines whether this instance is loading.

    Declaration
    public bool IsLoading()
    Returns
    Type Description
    Boolean

    true if this instance is loading; otherwise, false.

    LoadProduct(Int32)

    Loads the product.

    Declaration
    public AsyncOperationHandle<GameObject> LoadProduct(int index)
    Parameters
    Type Name Description
    Int32 index

    The index.

    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    AsyncOperationHandle<GameObject>.

    OnValidate()

    Called when [validate].

    Declaration
    public void OnValidate()

    ProcessConfigurationOperation(ProviderOperation<RuleEngineReply>, Action<RuleEngineReply>)

    Processes the configuration operation.

    Declaration
    public void ProcessConfigurationOperation(ProviderOperation<RuleEngineReply> configChangeOperation, Action<RuleEngineReply> callback = null)
    Parameters
    Type Name Description
    ProviderOperation<RuleEngineReply> configChangeOperation

    The configuration change operation.

    Action<RuleEngineReply> callback

    The callback.

    ProcessConfigurationReply(RuleEngineReply, Action<RuleEngineReply>)

    Processes the configuration reply.

    Declaration
    public void ProcessConfigurationReply(RuleEngineReply reply, Action<RuleEngineReply> callback = null)
    Parameters
    Type Name Description
    RuleEngineReply reply

    The reply.

    Action<RuleEngineReply> callback

    The callback.

    QueryConfigurationChangeValidity(ConfigurationChange)

    Verifies a configuration change (asynchronously), the change is validated against the configuration which the configuration change references.

    Declaration
    public ProviderOperation<RuleEngineReply> QueryConfigurationChangeValidity(ConfigurationChange configurationChange)
    Parameters
    Type Name Description
    ConfigurationChange configurationChange

    The configuration change.

    Returns
    Type Description
    ProviderOperation<RuleEngineReply>

    ProviderOperation<RuleEngineReply>.

    Remarks

    This is an asynchronous call that returns a handle of type IAsyncOperation{RuleEngineReply}. For some implementations, it may be that the call is effectively synchronous and the handle already contains the result. Check if IAsyncOperation{T}.isDone is

    true
    after calling this method if this is the case.

    Exceptions
    Type Condition
    ArgumentNullException

    Configuration change must not be null.

    InvalidOperationException

    There is no produced loaded.

    InvalidOperationException

    There is no rule engine, cannot check validity of configuration change.

    InvalidOperationException

    There is currently no context, cannot check validity of configuration change.

    InvalidOperationException

    Configuration change must not be null.

    InvalidOperationException

    There is no produced loaded.

    InvalidOperationException

    There is no rule engine, cannot check validity of configuration change.

    InvalidOperationException

    There is currently no context, cannot check validity of configuration change.

    QueryDefaultConfigurationValidity()

    Verifies the default configuration belonging to the current context (asynchronously).

    Declaration
    public ProviderOperation<RuleEngineReply> QueryDefaultConfigurationValidity()
    Returns
    Type Description
    ProviderOperation<RuleEngineReply>

    ProviderOperation<RuleEngineReply>.

    Remarks

    This is an asynchronous call that returns a handle of type IAsyncOperation{RuleEngineReply}. For some implementations, it may be that the call is effectively synchronous and the handle already contains the result. Check if IAsyncOperation{T}.isDone is

    true
    after calling this method if this is the case.

    Exceptions
    Type Condition
    InvalidOperationException

    The current configuration is not empty: cannot apply default configuration.

    InvalidOperationException

    There must be a context to apply the default configuration.

    InvalidOperationException

    There is no produced loaded.

    InvalidOperationException

    The current configuration is not empty: cannot apply default configuration.

    InvalidOperationException

    There must be a context to apply the default configuration.

    InvalidOperationException

    There is no produced loaded.

    InvalidOperationException

    The current configuration is not empty: cannot apply default configuration.

    SwitchProduct(Int32)

    Unloads the current product (destroys it) and loads the product with the given index.

    Declaration
    public AsyncOperationHandle<GameObject> SwitchProduct(int index)
    Parameters
    Type Name Description
    Int32 index

    The index.

    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    AsyncOperationHandle<GameObject>.

    SwitchProductAndApplyDefaultConfiguration(Int32)

    Unloads the current product (destroys it) and loads the product with the given index.

    Declaration
    public AsyncOperationHandle<GameObject> SwitchProductAndApplyDefaultConfiguration(int index)
    Parameters
    Type Name Description
    Int32 index

    The index.

    Returns
    Type Description
    AsyncOperationHandle<GameObject>

    AsyncOperationHandle<GameObject>.

    UnloadCurrentProduct()

    Unloads the current product.

    Declaration
    public void UnloadCurrentProduct()

    Events

    configurationApplied

    Raised when a configuration change has been applied to the variant table and all assignments have been switched.

    Declaration
    public event ConfigurationAppliedHandler configurationApplied
    Event Type
    Type Description
    ConfigurationAppliedHandler

    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