docs.unity3d.com
    Show / Hide Table of Contents

    Class VariantTable

    Central class which holds the variant table, i.e., variants, packs, sets thereof.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    VariantTable
    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 VariantTable : MonoBehaviour

    Fields

    forceStandardConfigurationsValidation

    Force all configuration to have standard validation. A valid standard configuration is one where one variant of every variant set is selected.

    Declaration
    [SerializeField]
    public bool forceStandardConfigurationsValidation
    Field Value
    Type Description
    Boolean

    Properties

    featureSets

    The collection of all feature sets.

    Declaration
    public ReadOnlyCollection<FeatureSet> featureSets { get; }
    Property Value
    Type Description
    ReadOnlyCollection<FeatureSet>

    The feature sets.

    GetAllAssignments

    Gets the get all assignments.

    Declaration
    public IEnumerable<Assignment> GetAllAssignments { get; }
    Property Value
    Type Description
    IEnumerable<Assignment>

    The get all assignments.

    GetAllDeferredQueries

    Gets the get all deferred queries.

    Declaration
    public IEnumerable<DeferredQuery> GetAllDeferredQueries { get; }
    Property Value
    Type Description
    IEnumerable<DeferredQuery>

    The get all deferred queries.

    GetAllQueries

    Gets the get all queries.

    Declaration
    public IEnumerable<QueryNode> GetAllQueries { get; }
    Property Value
    Type Description
    IEnumerable<QueryNode>

    The get all queries.

    packSets

    Shorthand to get a list of pack sets

    Declaration
    public IEnumerable<PackSet> packSets { get; }
    Property Value
    Type Description
    IEnumerable<PackSet>

    The pack sets.

    product

    Product to which the variant table belongs.

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

    The product.

    Exceptions
    Type Condition
    InvalidOperationException

    The variant table is not part of a product.

    variantSets

    Shorthand to get a list of variant sets

    Declaration
    public IEnumerable<VariantSet> variantSets { get; }
    Property Value
    Type Description
    IEnumerable<VariantSet>

    The variant sets.

    Methods

    AddFeatureSet<T>(String)

    Creates a new FeatureSet and returns it.

    Declaration
    public T AddFeatureSet<T>(string code)
        where T : FeatureSet
    Parameters
    Type Name Description
    String code

    Code of the feature set

    Returns
    Type Description
    T

    The feature set added

    Type Parameters
    Name Description
    T

    AddPack(String)

    Creates a new Pack and returns it.

    Declaration
    public Pack AddPack(string code)
    Parameters
    Type Name Description
    String code

    The code.

    Returns
    Type Description
    Pack

    Pack.

    CreateDefaultConfiguration()

    Creates the default configuration.

    Declaration
    public void CreateDefaultConfiguration()

    ExecuteQueries(QueryContext)

    Executes the queries.

    Declaration
    public void ExecuteQueries(QueryContext context = null)
    Parameters
    Type Name Description
    QueryContext context

    The context.

    ForceValidConfigurations()

    Forces the valid configurations.

    Declaration
    public void ForceValidConfigurations()

    GetGroupForTag(String)

    Gets the group for tag.

    Declaration
    public TagGroup GetGroupForTag(string tag)
    Parameters
    Type Name Description
    String tag

    The tag.

    Returns
    Type Description
    TagGroup

    TagGroup.

    GetSelectedFeatures()

    Returns the current selection of features as a configuration.

    Declaration
    public List<Feature> GetSelectedFeatures()
    Returns
    Type Description
    List<Feature>

    List<Feature>.

    MoveFeatureSet(FeatureSet, Int32)

    Move the feature set to index of the variant table

    Declaration
    public void MoveFeatureSet(FeatureSet featureSet, int index)
    Parameters
    Type Name Description
    FeatureSet featureSet

    The feature set.

    Int32 index

    The index.

    Remarks

    Throws an ArgumentOutOfRangeException if input index is out of range.

    Exceptions
    Type Condition
    ArgumentNullException

    Feature set to move must not be null.

    ArgumentOutOfRangeException

    Feature set index to move must be in range.

    Exception

    Wrong expectation

    RemoveFeatureSet(FeatureSet)

    Removes a FeatureSet from the variant table (along with all its variants).

    Declaration
    public void RemoveFeatureSet(FeatureSet featureSet)
    Parameters
    Type Name Description
    FeatureSet featureSet

    The feature set.

    Remarks

    Throws ArgumentException if the passed feature set is not in the variant table.

    Exceptions
    Type Condition
    ArgumentNullException

    Feature set must not be null.

    ArgumentException

    The feature set is not part of this variant table.

    RemovePack(Pack)

    Remove Pack.

    Declaration
    public void RemovePack(Pack pack)
    Parameters
    Type Name Description
    Pack pack

    The pack.

    Exceptions
    Type Condition
    ArgumentNullException

    Pack must not be null.

    ArgumentException

    The pack is not part of this variant table.

    ResetSelections()

    Selects the first feature in all feature sets.

    Declaration
    public void ResetSelections()

    Events

    variantTableChanged

    Occurs when [variant table changed].

    Declaration
    public event VariantTableChangedHandler variantTableChanged
    Event Type
    Type Description
    VariantTableChangedHandler

    Extension Methods

    Async.StartThrowingCoroutine(MonoBehaviour, IEnumerator, Action<Exception>)
    VariantTableExtensions.GetAllFeatures(VariantTable)
    VariantTableExtensions.GetVariants(VariantTable)
    VariantTableExtensions.GetVariantSets(VariantTable)
    VariantTableExtensions.GetAllDescendantPacks(VariantTable)
    VariantTableExtensions.GetPackSets(VariantTable)
    VariantTableExtensions.CreatePackSet(VariantTable, String)
    VariantTableExtensions.DeletePack(VariantTable, Pack)
    VariantTableExtensions.DeletePackSet(VariantTable, PackSet)
    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