Editar

Compartir a través de


MixedRealityControllerModelHelpers.TryAddVisualizationScript Method

Definition

Tries to read the controller visualization profile to apply a visualization script to the passed-in controller model.

public:
 static bool TryAddVisualizationScript(UnityEngine::GameObject ^ controllerModel, Type ^ controllerType, Microsoft::MixedReality::Toolkit::Utilities::Handedness handedness);
public static bool TryAddVisualizationScript (UnityEngine.GameObject controllerModel, Type controllerType, Microsoft.MixedReality.Toolkit.Utilities.Handedness handedness);
static member TryAddVisualizationScript : UnityEngine.GameObject * Type * Microsoft.MixedReality.Toolkit.Utilities.Handedness -> bool
Public Shared Function TryAddVisualizationScript (controllerModel As GameObject, controllerType As Type, handedness As Handedness) As Boolean

Parameters

controllerModel
UnityEngine.GameObject

The GameObject to modify.

controllerType
Type

The type of controller this model represents.

handedness
Handedness

The handedness of this controller.

Returns

True if a visualization script could be loaded and applied.

Remarks

Automatically disables DestroyOnSourceLost to encourage controller model creators to manage their life-cycle themselves.

Applies to