Michsky – Docs Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 
Michsky – Docs Michsky – Docs
Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 

Motion Titles Pack

  • Quick Start
  • Scripting
  1. Home
  2. Motion Titles Pack
  3. Scripting
Updated on December 8, 2025

Motion Titles Pack

  • Quick Start
  • Scripting

Scripting

Author: admin 215 views

Learn more about MTP scripting API.

Workflow

For animation or playback, you can use the functions available in the Style Manager. As long as Force Update is disabled, you can also directly reference the TextMeshPro or Image components and modify them through their APIs.

Code Example

				
					using Michsky.UI.MTP;
using UnityEngine;

public class StyleManagerAdvancedExample : MonoBehaviour
{
    [Header("UI Style Manager")]
    public StyleManager styleManager;

    void Start()
    {
        // General playback settings
		styleManager.loopAnimations = false;   // Loop style animations
        styleManager.playOnEnable = false;     // Play when object is enabled
        styleManager.AnimationSpeed = 1.2f;    // Speed adjustment
        styleManager.showFor = 2.5f;           // Delay before out
        styleManager.playOutAnimation = true;  // Play out animation after showFor
		
		// Disable object after the out animation
        styleManager.disableOnOut = true;

		// Set whether to use deltaTime or unscaledDeltaTime
        styleManager.UseUnscaledTime = true;

        // Optional events
        styleManager.onEnable.AddListener(() => Debug.Log("Style enabled"));
        styleManager.onDisable.AddListener(() => Debug.Log("Style disabled"));

        // Trigger animation
        styleManager.Play();
    }

    void Update()
    {
        // Press Space to toggle In/Out
        if (Input.GetKeyDown(KeyCode.Space))
        {
            if (styleManager.IsPlaying)
                styleManager.PlayOut();
            else
                styleManager.PlayIn();
        }
    }
}
				
			

How can we help?

A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.

© 2024 Michsky