Learn how to change MTP variables using scripting.
For animation or playback, you can use Style Manager functions. As long as ‘Force To Update’ is disabled, you can also directly reference TextMesh Pro or Image and change them using their API.
using Michsky.UI.MTP; // namespace
public StyleManager mtpObject;
void YourFunction()
{
mtpObject.InitializeSpeed(1f); // Change animation speed
mtpObject.showFor = 3f; // Show MTP object for a specific amount of time on play
mtpObject.forceUpdate = false; // Force MTP object to update on enable
mtpObject.Play(); // Play the animation
}
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.