usingSystem;usingSystem.Collections;usingSystem.Collections.Generic;usingUnityEngine;usingUnityEngine.UI;publicclassMessenger:MonoBehaviour{publicTextMainText;publicObstacleSpawnerSpawner;privateEventTimelinetimeline;// Start is called before the first frame updatevoidStart(){timeline=Spawner.GetEventTimeline();//timeline.Add(1, "Test");//timeline.Add(3, "");timeline.OnMessageEvent+=MessageOnEvent;}// Update is called once per framevoidUpdate(){}voidMessageOnEvent(EventTimeline.MessageEvente){MainText.text=e.message;}}