Class Utilities
Class Utilities.
Namespace: Unity.Industrial.Forma.Core.Utils
Syntax
[MovedFrom(true, "UnityEngine.Industrial.Configuring.Core", "Unity.Industrial.Configurator", null)]
public static class Utilities
Fields
productSetupPanel
The product setup panel
Declaration
public static IProductSetupPanel productSetupPanel
Field Value
Type | Description |
---|---|
IProductSetupPanel |
productStagingPanel
The product staging panel
Declaration
public static IStagingPanel productStagingPanel
Field Value
Type | Description |
---|---|
IStagingPanel |
Methods
CreateGameObject(GameObject, String)
Allow creating a game object in scene or prefab edit mode. Mainly used to add new variant table object.
Declaration
public static GameObject CreateGameObject(GameObject parent, string name = "GameObject")
Parameters
Type | Name | Description |
---|---|---|
GameObject | parent | The parent. |
String | name | The name. |
Returns
Type | Description |
---|---|
GameObject | GameObject. |
FixRuntimeProductEditorMaterials(Product)
Workaround that fix pink materials when loading another platform addressable content in the Editor. (eg: loading an Android catalog in Windows Editor)
Declaration
public static void FixRuntimeProductEditorMaterials(Product product)
Parameters
Type | Name | Description |
---|---|---|
Product | product | Product to fix |
GetMaxTextureSize(Texture)
UnityEngine.Texture class extension to calculate its minimum viable MaxTexture size.
Declaration
public static int GetMaxTextureSize(this Texture texture)
Parameters
Type | Name | Description |
---|---|---|
Texture | texture | Texture |
Returns
Type | Description |
---|---|
Int32 | Minimum viable MaxTexture size |
GetValidationReport(ProductRuntimeUIData)
Iterate through the Product's Feature Table and Validate that the data in ProductRuntimeUIData is Valid
Declaration
public static void GetValidationReport(ProductRuntimeUIData data)
Parameters
Type | Name | Description |
---|---|---|
ProductRuntimeUIData | data | The data. |
IsGameObjectSceneInstance(GameObject)
Detect if the gameObject is an instance in the scene or not.
Declaration
public static bool IsGameObjectSceneInstance(GameObject gameObject)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | GameObject from scene |
Returns
Type | Description |
---|---|
Boolean |
NormalizePath(String)
Will normalize the directory separator Chars based on the current platform (eg: '' or '/').
Declaration
public static string NormalizePath(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | PAth to normalize |
Returns
Type | Description |
---|---|
String | Normalized path |
RecordPrefabInstanceModificationsOrSetDirty(Object)
Depending on if the SuspendAssetImportBlock is active or not, Record modifications for undo manager, else just set dirty. Useful when importing data.
Declaration
public static void RecordPrefabInstanceModificationsOrSetDirty(Object unityObject)
Parameters
Type | Name | Description |
---|---|---|
Object | unityObject |
SetWebGLTextureSettings(TextureImporter, Int32)
Sets the WebGL-specific texture settings for thumbnails.
Declaration
public static void SetWebGLTextureSettings(this TextureImporter textureImporter, int maxTextureSize)
Parameters
Type | Name | Description |
---|---|---|
TextureImporter | textureImporter | |
Int32 | maxTextureSize |