Class ProductDefinition
Class ProductDefinition.
Inherited Members
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
Namespace: UnityEngine.Industrial.Configuring.Core
Syntax
[CreateAssetMenu(menuName = "Forma/Product Definition", fileName = "Product Definition", order = 10)]
public class ProductDefinition : ScriptableObject
Fields
label
The label
Declaration
[SerializeField]
public string label
Field Value
Type | Description |
---|---|
String |
profiles
The profiles
Declaration
[SerializeField]
public List<ProductVariantProfile> profiles
Field Value
Type | Description |
---|---|
List<ProductVariantProfile> |
Properties
DefaultThumbnail
Gets the default thumbnail.
Declaration
public Texture2D DefaultThumbnail { get; }
Property Value
Type | Description |
---|---|
Texture2D | The default thumbnail. |
LabelOrDefault
Gets the label or default.
Declaration
public string LabelOrDefault { get; }
Property Value
Type | Description |
---|---|
String | The label or default. |
Methods
GetProductReference(Product)
Gets the product reference.
Declaration
public ProductProfileReference GetProductReference(Product product)
Parameters
Type | Name | Description |
---|---|---|
Product | product | The product. |
Returns
Type | Description |
---|---|
ProductProfileReference | ProductProfileReference. |
GetProductReference(ProductVariantProfile)
Gets the product reference.
Declaration
public ProductProfileReference GetProductReference(ProductVariantProfile profile)
Parameters
Type | Name | Description |
---|---|---|
ProductVariantProfile | profile | The profile. |
Returns
Type | Description |
---|---|
ProductProfileReference | ProductProfileReference. |
GetProfileForProduct(Product)
Gets the profile for product.
Declaration
public ProductVariantProfile GetProfileForProduct(Product product)
Parameters
Type | Name | Description |
---|---|---|
Product | product | The product. |
Returns
Type | Description |
---|---|
ProductVariantProfile | ProductVariantProfile. |
Events
anyProductDefinitionChanged
Occurs when [any product definition changed].
Declaration
public static event Action<ProductDefintionChangeArgs> anyProductDefinitionChanged
Event Type
Type | Description |
---|---|
Action<ProductDefintionChangeArgs> |