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
    VariantTable
    Namespace: Unity.Industrial.Forma.Core.Variants
    Syntax
    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
    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.

    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 if input index is out of range.

    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 if the passed feature set is not in the variant table.

    RemovePack(Pack)

    Remove Pack.

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

    The pack.

    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

    VariantTableExtensions.GetAllFeatures(VariantTable)
    VariantTableExtensions.FindFeaturesByCode(VariantTable, IEnumerable<String>)
    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
    Terms of use
    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