Class ProductEditScope
Product editor scope
Create a scope for an isolated scene to import product
Namespace: UnityEditor.Industrial.Configuring.UI
Syntax
public class ProductEditScope : IDisposable
Fields
Product
Product asset loaded in a scene in memory. Use this instance to modify your product, add variants, etc...
Declaration
public Product Product
Field Value
Type | Description |
---|---|
Product |
ProductPrefabAsset
Product prefab asset is the product object of the prefab asset. Note that this object is not loaded in memory and you will not be able to modify its content such as its variant table.
Declaration
public Product ProductPrefabAsset
Field Value
Type | Description |
---|---|
Product |
Scope
// Get a reference to the Product Prefab's Asset Path
Declaration
public PrefabUtility.EditPrefabContentsScope Scope
Field Value
Type | Description |
---|---|
PrefabUtility.EditPrefabContentsScope |
Properties
ProductPrefabAssetPath
// Get a reference to the Product Prefab's Asset Path
Declaration
public string ProductPrefabAssetPath { get; }
Property Value
Type | Description |
---|---|
String |
Methods
Dispose()
Dispose of the edit scope and closes the in-memory prefab scene
Declaration
public void Dispose()
Init(String)
Initializes the scope from a the path to a model file
Declaration
public Task Init(string cadDataPath)
Parameters
Type | Name | Description |
---|---|---|
String | cadDataPath |
Returns
Type | Description |
---|---|
Task | Task |
Init(GameObject)
Initializes the scope from a prefab game object
Declaration
public Task Init(GameObject cadPrefab)
Parameters
Type | Name | Description |
---|---|---|
GameObject | cadPrefab |
Returns
Type | Description |
---|---|
Task | Task |