docs.unity3d.com
    Show / Hide Table of Contents

    Class Variant

    A variant is a feature with assignments that have consequences on the state of the product (geometry visbility, materials, etc.).

    Inheritance
    Object
    Feature
    Variant
    Inherited Members
    Feature.code
    Feature.featureSet
    Feature.codeChanged
    Feature.globalFeatureChangedHandler
    Feature.SetCode(String)
    Namespace: Unity.Industrial.Forma.Core.Variants
    Syntax
    public sealed class Variant : Feature

    Properties

    assignments

    List of assignments associated with this variant (read-only).

    Declaration
    public ReadOnlyCollection<Assignment> assignments { get; }
    Property Value
    Type Description
    ReadOnlyCollection<Assignment>

    The assignments.

    Methods

    AddAssignment(Assignment)

    Adds the assignment.

    Declaration
    public void AddAssignment(Assignment assignment)
    Parameters
    Type Name Description
    Assignment assignment

    The assignment.

    AddAssignment<T>()

    Creates and adds a new assignment of the given type to the variant.

    Declaration
    public T AddAssignment<T>()
        where T : Assignment
    Returns
    Type Description
    T

    T.

    Type Parameters
    Name Description
    T

    RemoveAssignment(Assignment, Boolean)

    Removes the given assignment from this variant.

    Declaration
    public void RemoveAssignment(Assignment assigment, bool deleteAssignment = true)
    Parameters
    Type Name Description
    Assignment assigment

    The assigment.

    Boolean deleteAssignment

    if set to true [delete assignment].

    Events

    assignmentsChanged

    Occurs when [assignments changed].

    Declaration
    public event Variant.VariantAssignmentsChangedHandler assignmentsChanged
    Event Type
    Type Description
    Variant.VariantAssignmentsChangedHandler
    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