docs.unity3d.com
    Show / Hide Table of Contents

    Class Product

    Class Product.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    Product
    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
    [DisallowMultipleComponent]
    [ExecuteInEditMode]
    public class Product : MonoBehaviour

    Fields

    definition

    The definition

    Declaration
    [SerializeField]
    public ProductDefinition definition
    Field Value
    Type Description
    ProductDefinition

    model

    The model

    Declaration
    [SerializeField]
    public GameObject model
    Field Value
    Type Description
    GameObject

    modelSet

    The model set

    Declaration
    [FormerlySerializedAs("modelAndQueries")]
    [SerializeField]
    public GameObject modelSet
    Field Value
    Type Description
    GameObject

    modelSetPrefab

    The model set prefab

    Declaration
    [FormerlySerializedAs("modelAndQueriesPrefab")]
    [SerializeField]
    public GameObject modelSetPrefab
    Field Value
    Type Description
    GameObject

    ModelSetPrefabSuffix

    The model set prefab suffix

    Declaration
    public const string ModelSetPrefabSuffix = " ModelSet"
    Field Value
    Type Description
    String

    ProductDefinitionSuffixWithFileExtension

    The product definition suffix with file extension

    Declaration
    public const string ProductDefinitionSuffixWithFileExtension = " Product Definition.asset"
    Field Value
    Type Description
    String

    ProductPrefabSuffix

    The product prefab suffix

    Declaration
    public const string ProductPrefabSuffix = " Product"
    Field Value
    Type Description
    String

    settings

    We separate the product settings structurally from the product so that they can be made independent of the actual models. This allows the settings to be used as they own prefab, which gives flexibility and ease-of-use when re-using a similar variant table and other settings across many similar models.

    Declaration
    [SerializeField]
    public ProductSettings settings
    Field Value
    Type Description
    ProductSettings

    SettingsSuffix

    The settings suffix

    Declaration
    public const string SettingsSuffix = " Settings"
    Field Value
    Type Description
    String

    UnhandleQueriesPrefix

    The unhandle queries prefix

    Declaration
    public const string UnhandleQueriesPrefix = "UH_"
    Field Value
    Type Description
    String

    Properties

    contextCollection

    Gets the context collection.

    Declaration
    public ContextCollection contextCollection { get; }
    Property Value
    Type Description
    ContextCollection

    The context collection.

    defaults

    Gets the defaults.

    Declaration
    public IReadOnlyDictionary<Context, Configuration> defaults { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<Context, Configuration>

    The defaults.

    isDirty

    Gets or sets a value indicating whether this instance is dirty.

    Declaration
    public bool isDirty { get; set; }
    Property Value
    Type Description
    Boolean

    true if this instance is dirty; otherwise, false.

    localPriceData

    Gets the local price data.

    Declaration
    public ProductLocalPrice localPriceData { get; }
    Property Value
    Type Description
    ProductLocalPrice

    The local price data.

    ModelSetComponent

    Gets the model set component.

    Declaration
    public ModelSet ModelSetComponent { get; }
    Property Value
    Type Description
    ModelSet

    The model set component.

    presets

    Gets the presets.

    Declaration
    public ReadOnlyCollection<Configuration> presets { get; }
    Property Value
    Type Description
    ReadOnlyCollection<Configuration>

    The presets.

    productBounds

    Gets the product bounds.

    Declaration
    public Bounds productBounds { get; }
    Property Value
    Type Description
    Bounds

    The product bounds.

    ProfileReference

    Gets the profile reference.

    Declaration
    public ProductProfileReference ProfileReference { get; }
    Property Value
    Type Description
    ProductProfileReference

    The profile reference.

    Queries

    Gets the queries.

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

    The queries.

    QueryContext

    Gets the query context.

    Declaration
    public QueryContext QueryContext { get; }
    Property Value
    Type Description
    QueryContext

    The query context.

    QueryResults

    Gets the query results.

    Declaration
    public QueryResults QueryResults { get; }
    Property Value
    Type Description
    QueryResults

    The query results.

    rules

    Gets the rules.

    Declaration
    public Rules rules { get; }
    Property Value
    Type Description
    Rules

    The rules.

    runtimeUIData

    Gets the runtime UI data.

    Declaration
    public ProductRuntimeUIData runtimeUIData { get; }
    Property Value
    Type Description
    ProductRuntimeUIData

    The runtime UI data.

    spawnPoint

    Gets the spawn point.

    Declaration
    public Transform spawnPoint { get; }
    Property Value
    Type Description
    Transform

    The spawn point.

    stagingSettings

    Gets the staging settings.

    Declaration
    public StagingSettings stagingSettings { get; }
    Property Value
    Type Description
    StagingSettings

    The staging settings.

    variantTable

    Gets the variant table.

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

    The variant table.

    Methods

    AddDefault(Context)

    Adds the default.

    Declaration
    public Configuration AddDefault(Context context)
    Parameters
    Type Name Description
    Context context

    The context.

    Returns
    Type Description
    Configuration

    Configuration.

    AddPreset()

    Adds the preset.

    Declaration
    public Configuration AddPreset()
    Returns
    Type Description
    Configuration

    Configuration.

    Awake()

    Awakes this instance.

    Declaration
    public void Awake()

    CenterSpawnPoint()

    Centers the spawn point.

    Declaration
    [ContextMenu("Center Spawn Point")]
    public void CenterSpawnPoint()

    CreateSpawnPoint()

    Creates the spawn point.

    Declaration
    public void CreateSpawnPoint()

    EnsureModelExists(Transform)

    The model is either the instantiated model prefab if there is one

    Declaration
    public void EnsureModelExists(Transform parent = null)
    Parameters
    Type Name Description
    Transform parent

    The parent.

    ExecuteQueries()

    Executes the queries.

    Declaration
    public void ExecuteQueries()

    GetModelGameObjectTransform()

    Gets the model game object transform.

    Declaration
    public Transform GetModelGameObjectTransform()
    Returns
    Type Description
    Transform

    Transform.

    Init()

    Initializes this instance.

    Declaration
    public void Init()

    IsConfiguratorHiddenObject(GameObject)

    Determines whether [is configurator hidden object] [the specified object].

    Declaration
    public bool IsConfiguratorHiddenObject(GameObject obj)
    Parameters
    Type Name Description
    GameObject obj

    The object.

    Returns
    Type Description
    Boolean

    true if [is configurator hidden object] [the specified object]; otherwise, false.

    OnValidate()

    Called when [validate].

    Declaration
    public void OnValidate()

    RefreshProductBounds()

    Refreshes the product bounds.

    Declaration
    public void RefreshProductBounds()

    RemoveDefault(Context)

    Removes the default.

    Declaration
    public void RemoveDefault(Context context)
    Parameters
    Type Name Description
    Context context

    The context.

    RemovePreset(Configuration)

    Removes the preset.

    Declaration
    public void RemovePreset(Configuration preset)
    Parameters
    Type Name Description
    Configuration preset

    The preset.

    ResetProductPosition()

    Resets the product position.

    Declaration
    public void ResetProductPosition()

    RevertModelPrefab()

    Reverts the model prefab.

    Declaration
    [ContextMenu("Revert Model Prefab")]
    public void RevertModelPrefab()

    SetConfiguratorProfileResources(List<String>)

    Sets the configurator profile resources.

    Declaration
    public void SetConfiguratorProfileResources(List<string> materialResources)
    Parameters
    Type Name Description
    List<String> materialResources

    The material resources.

    SetLocation(Transform)

    Places the product in the scene by setting its parent and positioning it according to its spawn point.

    Declaration
    public void SetLocation(Transform parent)
    Parameters
    Type Name Description
    Transform parent

    The node that will become the parent of the product.

    SetQueryRoot()

    Sets the query root.

    Declaration
    public void SetQueryRoot()

    Events

    anyProductChanged

    Occurs when [any product changed].

    Declaration
    public static event Action<ProductChangeArgs> anyProductChanged
    Event Type
    Type Description
    Action<ProductChangeArgs>

    defaultsChanged

    Called when a default has been added or removed.

    Declaration
    public event ProductDefaultsChangedHandler defaultsChanged
    Event Type
    Type Description
    ProductDefaultsChangedHandler

    presetsChanged

    Called when a preset has been added or removed.

    Declaration
    public event ProductPresetsChangedHandler presetsChanged
    Event Type
    Type Description
    ProductPresetsChangedHandler

    productChanged

    Called when any property has changed

    Declaration
    public event EventHandler productChanged
    Event Type
    Type Description
    EventHandler

    Extension Methods

    Async.StartThrowingCoroutine(MonoBehaviour, IEnumerator, Action<Exception>)
    ProductServices.GetVariantAssignmentByMaterial(Product, Material)
    VariantTableExtensions.IsPackAlreadyExistWithContext(Product, String, Dictionary<String, String>, List<Feature>)
    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