docs.unity3d.com
    Show / Hide Table of Contents

    Class WebGLAPI

    Inheritance
    Object
    WebGLAPI
    Namespace: UnityEngine.Industrial.Forma.WebGLAPI
    Syntax
    public class WebGLAPI : MonoBehaviour

    Methods

    GetCameras()

    Gets the list of cameras available that are currently available

    Declaration
    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
    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
    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
    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
    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
    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
    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
    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
    public static void GetFeatureSets()

    GetProducts()

    Gets the list of products that are currently available

    Declaration
    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.

    GetSelectedFeature(String)

    Get the currently selected feature for the specified feature set.

    Declaration
    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.

    SelectFeature(String)

    Select or deselect the specified feature on the current configurator product

    Declaration
    public static void SelectFeature(string featureCode)
    Parameters
    Type Name Description
    String featureCode

    The identifier of the feature

    SwitchCamera(String)

    Switches the current camera of the configurator

    Declaration
    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
    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
    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
    public static void SwitchProduct(int index)
    Parameters
    Type Name Description
    Int32 index

    The index of the product to switch to

    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