MW UNITY NAMESPACE








































public static class

UI


World space Canvas scaling and TextMeshProUGUI utilities.



public static Vector3

ScaleSize (Vector3 Self, Vector3 ScaleWith)

Summary:

Scales the canvas element relative to Self.

Params:

Self:

        The position to scale from.

ScaleWith:

        The position to scale with.

Returns:

The relative scale size in Vector2.



|Extension| IEnumerator

Typewrite (TextMeshProUGUI TMPro, MonoBehaviour Game, string Content, float Delay, ETypewriterMode Mode)

Summary:

Animates TMPro to display Content like a typewriter.

Remarks:

This is an extension function on TextMeshProUGUI.

Params:

TMPro:

        The extended TextMeshProUGUI GameObject.

Game:

        The MonoBehaviour that will be responsible for invoking the Typewriter coroutine.

Content:

        The content to typewrite.

Delay:

        The time gap between writing a new character.

Mode:

        Should the text ETypewriterMode.Append, or ETypewriterMode.Clear?

Returns:

The instance of the Typewriter coroutine.



|Extension| IEnumerator

Typewrite (TextMeshProUGUI TMPro, MonoBehaviour Game, string Content, float Delay, ETypewriterMode Mode, string Sound, bool bOverlapSound)

Summary:

Animates TMPro to display Content like a typewriter.

Remarks:

This is an extension function on TextMeshProUGUI.

Params:

TMPro:

        The extended TextMeshProUGUI GameObject.

Game:

        The MonoBehaviour that will be responsible for invoking the Typewriter coroutine.

Content:

        The content to typewrite.

Delay:

        The time gap between writing a new character.

Mode:

        Should the text ETypewriterMode.Append, or ETypewriterMode.Clear?

Sound:

        The MSound in MAudio.AudioInstance to play when writing a character.

Returns:

The instance of the Typewriter coroutine.



public static IEnumerator

TypewriterText (TextMeshProUGUI TMPro, string Content, float Delay, ETypewriterMode Mode)

Summary:

Animates TMPro to display Content like a typewriter.

Params:

TMPro:

        The text to animate.

Content:

        The content to typewrite.

Delay:

        The time gap between writing a new character.

Mode:

        Should the text ETypewriterMode.Append, or ETypewriterMode.Clear?



public static IEnumerator

TypewriterTextWithSound (TextMeshProUGUI TMPro, GameObject Caller, string Content, float Delay, ETypewriterMode Mode, string Sound, bool bOverlapSound)

Summary:

Animates TMPro to display Content like a typewriter.

Params:

TMPro:

        The text to animate.

Caller:

        The GameObject requesting to play the sound. Only required when bOverlapSound is true.

Content:

        The content to typewrite.

Delay:

        The time gap between writing a new character.

Mode:

        Should the text ETypewriterMode.Append, or ETypewriterMode.Clear?

Sound:

        The MSound in MAudio.AudioInstance to play when writing a character.