docs.unity3d.com
    Show / Hide Table of Contents

    Class WebGLAPI

    WebGLAPI

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    WebGLAPI
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, Boolean)
    Component.GetComponentInParent(Type)
    UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.Industrial.Forma.WebGLAPI
    Syntax
    [RequireComponent(typeof(Configurator))]
    public class WebGLAPI : MonoBehaviour

    Properties

    HideFormaRuntimeUIInBuild

    HideFormaRuntimeUIInBuild

    Declaration
    public bool HideFormaRuntimeUIInBuild { get; }
    Property Value
    Type Description
    Boolean

    Methods

    AddCatalogs(String)

    Add catalogs from a product source.

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void AddCatalogs(string productSourceInfoJson)
    Parameters
    Type Name Description
    String productSourceInfoJson

    Json product source data

    CreateProductSource(String)

    Create Product source.

    Declaration
    [MonoPInvokeCallback(typeof(Func<int, int>))]
    public static string CreateProductSource(string productSourceJson)
    Parameters
    Type Name Description
    String productSourceJson

    Json product source data

    Returns
    Type Description
    String

    Json string of json product source

    GetCameras()

    Gets the list of cameras available that are currently available

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static string GetCameras()
    Returns
    Type Description
    String

    The list of cameras as a string in JSON format. The list can be empty but will not be null.

    GetContexts()

    Gets the list of contexts that are currently available

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static string GetContexts()
    Returns
    Type Description
    String

    The list of contexts as a string in JSON format. The list can be empty but will not be null.

    GetCurrentCamera()

    Get information about the current camera that can be displayed in a UI

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static string GetCurrentCamera()
    Returns
    Type Description
    String

    Information about the camera as a string in JSON format, or null if the current camera is null

    GetCurrentEnvironment()

    Get information about the current environment that can be displayed in a UI

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static string GetCurrentEnvironment()
    Returns
    Type Description
    String

    Information about the environment as a string in JSON format, or null is the current environment is null

    GetCurrentProduct()

    Get information about the current product that can be displayed in a UI

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static string GetCurrentProduct()
    Returns
    Type Description
    String

    Information about the product as a string in JSON format, or null if the current product is null

    GetCurrentProductIndex()

    The index of the current configurator product

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static int GetCurrentProductIndex()
    Returns
    Type Description
    Int32

    An int value representing the 0-based index of the product

    GetEnvironments()

    Gets the list of environments that are currently available

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static string GetEnvironments()
    Returns
    Type Description
    String

    The list of environments as a string in JSON format. The list can be empty but will not be null.

    GetFeatures(String)

    Gets the list of features that are currently available. This method is asynchronous and will raise an event containing the features as a string in JSON format when ready. The list can be empty but will not be null.

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static async void GetFeatures(string featureSetCode)
    Parameters
    Type Name Description
    String featureSetCode

    GetFeatureSets()

    Gets the list of feature sets that are currently available. This method is asynchronous and will raise an event containing the feature sets as a string in JSON format when ready. The list can be empty but will not be null.

    Declaration
    [MonoPInvokeCallback(typeof(Action))]
    public static void GetFeatureSets()

    GetProducts()

    Gets the list of products that are currently available

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static string GetProducts()
    Returns
    Type Description
    String

    The list of product names as a string in JSON format. The list can be empty but will not be null.

    GetProductSources()

    Get Product sources.

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static string GetProductSources()
    Returns
    Type Description
    String

    Json string of json product source list.

    GetSelectedFeature(String)

    Get the currently selected feature for the specified feature set.

    Declaration
    [MonoPInvokeCallback(typeof(Func<int, int>))]
    public static string GetSelectedFeature(string featureSetCode)
    Parameters
    Type Name Description
    String featureSetCode

    The identifier of the feature set

    Returns
    Type Description
    String

    The feature identifier as a string, or null not found.

    GetTransparentBackground()

    Note: This feature needs to be enabled first in the project under "Forma/Advanced/Enable WebGL Transparent Background"

    Declaration
    [MonoPInvokeCallback(typeof(Func<int>))]
    public static int GetTransparentBackground()
    Returns
    Type Description
    Int32

    Enabled(1) or Disable(0) the transparent background.

    RemoteProcedureCall(String)

    RemoteProcedureCall

    Declaration
    [MonoPInvokeCallback(typeof(Func<int, int>))]
    public static string RemoteProcedureCall(string arg)
    Parameters
    Type Name Description
    String arg

    String to populate RPCArg from

    Returns
    Type Description
    String

    result as json

    RemoveCatalogs(String)

    Remove catalogs from a product source.

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void RemoveCatalogs(string productSourceInfoJson)
    Parameters
    Type Name Description
    String productSourceInfoJson

    Json product source data

    RemoveProductSource(String)

    Remove a product source.

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void RemoveProductSource(string id)
    Parameters
    Type Name Description
    String id

    Id of product source to add catalog to

    SelectFeature(String)

    Select or deselect the specified feature on the current configurator product

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void SelectFeature(string featureCode)
    Parameters
    Type Name Description
    String featureCode

    The identifier of the feature

    SetCaptureAllKeyboardInput(Int32)

    Set to false so elements in web page can handle keyboard inputs.

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void SetCaptureAllKeyboardInput(int allKeyboardInput)
    Parameters
    Type Name Description
    Int32 allKeyboardInput

    True(1) or False(0)

    SetTransparentBackground(Int32)

    Note: This feature needs to be enabled first in the project under "Forma/Advanced/Enable WebGL Transparent Background" Enabled or Disable the transparent background.

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void SetTransparentBackground(int value)
    Parameters
    Type Name Description
    Int32 value

    Enabled(1) or Disable(0) the transparent background.

    SwitchCamera(String)

    Switches the current camera of the configurator

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void SwitchCamera(string id)
    Parameters
    Type Name Description
    String id

    The id of the camera to switch to

    SwitchContext(String, String)

    Switches the context of the configurator

    Declaration
    [MonoPInvokeCallback(typeof(Action<int, int>))]
    public static void SwitchContext(string key, string value)
    Parameters
    Type Name Description
    String key

    The identifier of the context to switch

    String value

    The value to set for the specified context

    SwitchEnvironment(String)

    Switches the current environment of the configurator

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void SwitchEnvironment(string id)
    Parameters
    Type Name Description
    String id

    The id of the environment to switch to

    SwitchProduct(Int32)

    Switches the current product of the configurator

    Declaration
    [MonoPInvokeCallback(typeof(Action<int>))]
    public static void SwitchProduct(int index)
    Parameters
    Type Name Description
    Int32 index

    The index of the product to switch to

    UnloadCurrentProduct()

    Unload currently loaded product

    Declaration
    [MonoPInvokeCallback(typeof(Action))]
    public static void UnloadCurrentProduct()

    Extension Methods

    Async.StartThrowingCoroutine(MonoBehaviour, IEnumerator, Action<Exception>)
    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