docs.unity3d.com
    Show / Hide Table of Contents

    Class FeatureSet<T>

    Generic version of FeatureSet where the generic type is the type of the feature.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    FeatureSet
    FeatureSet<T>
    PackSet
    VariantSet
    Inherited Members
    FeatureSet.featureSetChanged
    FeatureSet.globalFeatureSetChangedHandler
    FeatureSet.code
    FeatureSet._thumbnailCameraHolder
    FeatureSet.ThumbnailCameraHolder
    FeatureSet._thumbnailCamera
    FeatureSet.ThumbnailCamera
    FeatureSet.RaiseFeatureSetChanged(Object, FeatureSetChangedArgs)
    FeatureSet.OnValidate()
    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
    [Serializable]
    [ExecuteInEditMode]
    public class FeatureSet<T> : FeatureSet, ISerializationCallbackReceiver where T : Feature
    Type Parameters
    Name Description
    T

    Fields

    _defaultFeature

    The default feature

    Declaration
    [HideInInspector]
    [SerializeField]
    protected T _defaultFeature
    Field Value
    Type Description
    T

    _featureForCode

    The feature for code

    Declaration
    protected Dictionary<string, T> _featureForCode
    Field Value
    Type Description
    Dictionary<String, T>

    _features

    The features

    Declaration
    [SerializeField]
    protected List<T> _features
    Field Value
    Type Description
    List<T>

    _selectedFeature

    The selected feature

    Declaration
    [SerializeField]
    protected T _selectedFeature
    Field Value
    Type Description
    T

    Properties

    codes

    Read-only collection of codes of the features in this set.

    Declaration
    public override IReadOnlyList<string> codes { get; }
    Property Value
    Type Description
    IReadOnlyList<String>

    The codes.

    Overrides
    FeatureSet.codes

    defaultFeature

    Gets the default feature.

    Declaration
    public T defaultFeature { get; }
    Property Value
    Type Description
    T

    The default feature.

    featureForCode

    Mapping from codes to features (read-only).

    Declaration
    public IReadOnlyDictionary<string, T> featureForCode { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<String, T>

    The feature for code.

    features

    List of features in this feature set (read-only).

    Declaration
    public IReadOnlyList<T> features { get; }
    Property Value
    Type Description
    IReadOnlyList<T>

    The features.

    selectedFeature

    Currently selected feature.

    Declaration
    public T selectedFeature { get; }
    Property Value
    Type Description
    T

    The selected feature.

    Remarks

    Use SelectFeature(T) for selecting a feature.

    variantTable

    Variant table containing this feature set.

    Declaration
    public VariantTable variantTable { get; }
    Property Value
    Type Description
    VariantTable

    The variant table.

    Exceptions
    Type Condition
    InvalidOperationException

    The feature set is not part of a variant table: it is not the child of a game object with a VariantTable component.

    Methods

    AddFeature(String)

    Adds a new feature of the given code to the feature set.

    Declaration
    public virtual T AddFeature(string featureCode)
    Parameters
    Type Name Description
    String featureCode

    The feature code.

    Returns
    Type Description
    T

    T.

    Remarks

    Throws ArgumentException if

    code
    is null or only whitespaces, or if there is already a variant of the given code in the set.

    Exceptions
    Type Condition
    ArgumentException

    Code must not be null or contain only whitespaces.

    ArgumentException

    Code already exists in variant set.

    ArgumentException

    Code must not be null or contain only whitespaces.

    ArgumentException

    Code already exists in variant set.

    DeselectFeature()

    Deselects the feature.

    Declaration
    public override void DeselectFeature()
    Overrides
    FeatureSet.DeselectFeature()

    featureIndexOf(Feature)

    Index of feature in this feature set

    Declaration
    public override int featureIndexOf(Feature feature)
    Parameters
    Type Name Description
    Feature feature

    The feature.

    Returns
    Type Description
    Int32

    System.Int32.

    Overrides
    FeatureSet.featureIndexOf(Feature)

    GetFeatures()

    Gets the features.

    Declaration
    protected override IReadOnlyList<Feature> GetFeatures()
    Returns
    Type Description
    IReadOnlyList<Feature>

    IReadOnlyList<Feature>.

    Overrides
    FeatureSet.GetFeatures()

    GetSelectedFeature()

    Gets the selected feature.

    Declaration
    protected override Feature GetSelectedFeature()
    Returns
    Type Description
    Feature

    Feature.

    Overrides
    FeatureSet.GetSelectedFeature()

    HandleFeatureCodeChange(Object, FeatureCodeChangedEventArgs)

    Handles the feature code change.

    Declaration
    protected void HandleFeatureCodeChange(object sender, FeatureCodeChangedEventArgs args)
    Parameters
    Type Name Description
    Object sender

    The sender.

    FeatureCodeChangedEventArgs args

    The FeatureCodeChangedEventArgs instance containing the event data.

    HasFeature(Feature)

    Determines whether the specified feature has feature.

    Declaration
    public bool HasFeature(Feature feature)
    Parameters
    Type Name Description
    Feature feature

    The feature.

    Returns
    Type Description
    Boolean

    true if the specified feature has feature; otherwise, false.

    MoveFeature(T, Int32)

    Move the feature to index of the feature set

    Declaration
    public void MoveFeature(T feature, int index)
    Parameters
    Type Name Description
    T feature

    The feature.

    Int32 index

    The index.

    Remarks

    Throws an ArgumentOutOfRangeException if input index is out of range.

    Exceptions
    Type Condition
    ArgumentNullException

    Feature to move must not be null.

    ArgumentOutOfRangeException

    Feature index to move must be in range.

    Exception

    Wrong expectation

    OnDisable()

    Called when [disable].

    Declaration
    protected void OnDisable()

    OnEnable()

    Called when [enable].

    Declaration
    protected void OnEnable()

    RemoveFeature(T)

    Removes the feature from the feature set (along with its assignments).

    Declaration
    public void RemoveFeature(T feature)
    Parameters
    Type Name Description
    T feature

    The feature.

    Remarks

    Throws an ArgumentException if the feature is not in the feature set.

    Exceptions
    Type Condition
    ArgumentNullException

    Feature to remove must not be null.

    ArgumentException

    Code {feature.code} does not exist in feature set.

    RemoveFeature(String)

    Removes the feature of the given code from the feature set (along with its assignments).

    Declaration
    public void RemoveFeature(string code)
    Parameters
    Type Name Description
    String code

    The code.

    Remarks

    Throws an ArgumentException if no feature of the given code is in the feature set.

    Exceptions
    Type Condition
    ArgumentException

    Code {code} does not exist in feature set.

    ResetSelection()

    Selects the first feature in the feature set.

    Declaration
    public override void ResetSelection()
    Overrides
    FeatureSet.ResetSelection()

    SelectFeature(T)

    Selects the passed feature, deselecting the previous feature.

    Declaration
    public void SelectFeature(T feature)
    Parameters
    Type Name Description
    T feature

    The feature.

    Remarks

    Throws an ArgumentException if the feature is

    null
    or not in the feature set.

    SelectFeatureInternal(T)

    Selects the feature internal.

    Declaration
    public void SelectFeatureInternal(T feature)
    Parameters
    Type Name Description
    T feature

    The feature.

    Exceptions
    Type Condition
    ArgumentException

    The feature with code {feature.code} is not in the feature set.

    SetDefaultFeature()

    Sets the default feature.

    Declaration
    public void SetDefaultFeature()

    Explicit Interface Implementations

    ISerializationCallbackReceiver.OnAfterDeserialize()

    Called when [after deserialize].

    Declaration
    void ISerializationCallbackReceiver.OnAfterDeserialize()
    Implements
    ISerializationCallbackReceiver.OnAfterDeserialize()

    ISerializationCallbackReceiver.OnBeforeSerialize()

    Called when [before serialize].

    Declaration
    void ISerializationCallbackReceiver.OnBeforeSerialize()
    Implements
    ISerializationCallbackReceiver.OnBeforeSerialize()

    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