예제 #1
0
 /// <summary>
 /// The SetOpacity method allows the opacity of the given GameObject to be changed. A lower alpha value will make the object more transparent, such as `0.5f` will make the controller partially transparent where as `0f` will make the controller completely transparent.
 /// </summary>
 /// <param name="model">The GameObject to change the renderer opacity on.</param>
 /// <param name="alpha">The alpha level to apply to opacity of the controller object. `0f` to `1f`.</param>
 /// <param name="transitionDuration">The time to transition from the current opacity to the new opacity.</param>
 public static void SetOpacity(GameObject model, float alpha, float transitionDuration = 0f)
 {
     SetupInstance();
     if (instance != null)
     {
         instance.InternalSetOpacity(model, alpha, transitionDuration);
     }
 }