docs.unity3d.com
    Show / Hide Table of Contents

    Class ProductSettings

    The product is the entry point for all components relevant to product. The Product class contains information about a single configurable product: identifiers (an internal ID, and/or the product name); the collection of contexts in which the product is available; a list of initial/default configurations for this product; the Variant Table, containing all possible variants; the local staging variants (environments, camera angles, etc.).

    Inheritance
    Object
    ProductSettings
    Namespace: Unity.Industrial.Forma.Core.Products
    Syntax
    public class ProductSettings : MonoBehaviour

    Fields

    forceSaveBeforePlayMode

    The force save before play mode

    Declaration
    public bool forceSaveBeforePlayMode
    Field Value
    Type Description
    Boolean

    isDirty

    The is dirty

    Declaration
    public bool isDirty
    Field Value
    Type Description
    Boolean

    product

    The product

    Declaration
    public Product product
    Field Value
    Type Description
    Product

    settingsName

    The settings name

    Declaration
    public const string settingsName = null
    Field Value
    Type Description
    String

    Properties

    contextCollection

    Context collection belonging to this product.

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

    The context collection.

    defaults

    Default configurations: each context can have a default configuration that is used as the basis before switching the model. Default configurations represent the initial state of a product for a given context. Normally, users do not select every single variant of a product, especially at the beginning of the configuration: in most cases, they only broadly select the product line and they can already see an initial, default configuration. The configuration workflow then builds upon this initial, default configuration

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

    The defaults.

    localPriceData

    Gets the local price data.

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

    The local price data.

    presets

    Preset configurations for this product.

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

    The presets.

    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 or sets the spawn point.

    Declaration
    public Transform spawnPoint { get; set; }
    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

    Variant table belonging to this product.

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

    The variant table.

    Methods

    AddDefault(Context)

    Adds a default configuration to the set of defaults.

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

    The context.

    Returns
    Type Description
    Configuration

    Creates a new (blank) configuration that is the default for this context.

    Remarks

    The

    context
    must be part of the ContextCollection

    AddPreset()

    Creates and adds a new preset configuration.

    Declaration
    public Configuration AddPreset()
    Returns
    Type Description
    Configuration

    Configuration.

    Awake()

    Awakes this instance.

    Declaration
    public void Awake()

    CreateSpawnPoint()

    Creates the spawn point.

    Declaration
    public void CreateSpawnPoint()

    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.

    OnDisable()

    Called when [disable].

    Declaration
    public void OnDisable()

    OnEnable()

    Called when [enable].

    Declaration
    public void OnEnable()

    OnValidate()

    Called when [validate].

    Declaration
    public void OnValidate()

    RemoveDefault(Context)

    Remove a default configuration from the set of defaults.

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

    The context.

    RemovePreset(Configuration)

    Removes the configuration from the presets and destroys it.

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

    The preset.

    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