Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Febucci.UI.Examples
|
||||
{
|
||||
//Prevents this example to show up in the inspector, since it should be used only in the example scene (and so, not annoy you after you understand how this works)
|
||||
[AddComponentMenu("")]
|
||||
public class UsageExample : MonoBehaviour
|
||||
{
|
||||
public TypewriterByCharacter textAnimatorPlayer;
|
||||
|
||||
[TextArea(3, 50), SerializeField]
|
||||
string textToShow = " ";
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
UnityEngine.Assertions.Assert.IsNotNull(textAnimatorPlayer, $"Text Animator Player component is null in {gameObject.name}");
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
ShowText();
|
||||
}
|
||||
|
||||
public void ShowText()
|
||||
{
|
||||
textAnimatorPlayer.ShowText(textToShow);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user