Class FormaCatalogLoader
Class FormaCatalogLoader.
Namespace: Unity.Industrial.Forma.Core.AddressableSources
Syntax
[MovedFrom(true, "UnityEngine.Industrial.Configuring.Core", "Unity.Industrial.Configurator", null)]
public class FormaCatalogLoader
Fields
AaFolderRootPath
The aa folder root path
Declaration
public string AaFolderRootPath
Field Value
| Type | Description |
|---|---|
| String |
CatalogPath
Gets the catalog path.
Declaration
public string CatalogPath
Field Value
| Type | Description |
|---|---|
| String | The catalog path. |
KDynamicAaVariableName
The k dynamic aa variable name
Declaration
public const string KDynamicAaVariableName = "FORMA_CATALOG_PATH"
Field Value
| Type | Description |
|---|---|
| String |
RelativeCatalogPath
The relative catalog path
Declaration
public string RelativeCatalogPath
Field Value
| Type | Description |
|---|---|
| String |
Properties
IsLoaded
Gets a value indicating whether this instance is loaded.
Declaration
public bool IsLoaded { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
IsLoading
Gets a value indicating whether this instance is loading.
Declaration
public bool IsLoading { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
Methods
Initialize(String)
Catalog loader that dynamically update the '{FORMA_CATALOG_PATH}' aa runtime variable before resolving catalog content dependencies.
This Initialize function will try to extract the filename from the provided URL to set the '{FORMA_CATALOG_PATH}' value as a root path. This may not work for each situation and the URL must not contain encoded variables (eg: https://unity3d.com/?path=...).
Note: Forma catalogs needs to be loaded synchronously, otherwise dependencies won't load correctly.
Declaration
public void Initialize(string fullCatalogPath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | fullCatalogPath | Load a catalog with a URL or a folder path |
Exceptions
| Type | Condition |
|---|---|
| Exception | Throw if catalog path / url is empty |
Initialize(String, String)
Catalog loader that dynamically update the '{FORMA_CATALOG_PATH}' aa runtime variable before resolving catalog content dependencies using the 'catalogRootPath' variable.
This Initialize function will use the provided URL to set the '{FORMA_CATALOG_PATH}' value directly as a root path.
Note: Forma catalogs needs to be loaded synchronously, otherwise dependencies won't load correctly.
Declaration
public void Initialize(string catalogRootPath, string catalogFileNameWithExtension)
Parameters
| Type | Name | Description |
|---|---|---|
| String | catalogRootPath | Catalog root Path / URL |
| String | catalogFileNameWithExtension | Catalog filename including the '.json" extension |
Exceptions
| Type | Condition |
|---|---|
| Exception | Throw if catalog path / url is empty |
Unload()
Unloads this instance.
Declaration
public void Unload()
Events
onCatalogStateChange
Occurs when [on catalog state change].
Declaration
public event FormaCatalogLoader.CatalogHandler onCatalogStateChange
Event Type
| Type | Description |
|---|---|
| FormaCatalogLoader.CatalogHandler |