If you want to run a function at some point in the cutscene, then you can create a script with that function and attach it on the Cutscene gameobject and finally use the “Events/Send Global Message” action clip possible to be added on the ActionTrack of the Director Group. Then in the inspector of that action clip, set the function you want to call.
So lets suppose that you have this script attached on the Cutscene GameObject:
1
2
3
4
5
6
7
8
publicclassMyScript:MonoBehaviour{
publicvoidLoadScene(stringname){
Application.LoadLevel(name);
}
}
You can then add “Events/Send Global Message (string)” action clip on an ActionTrack of the Director Group and set it to call the function named “LoadScene” with a parameter named “Menu”.
So, at least right now, only methods existing on MonoBehaviours and attached to either the Cutscene gameobject or any of it’s affected actor gameobjects, can be called from within the cutscene (similar to how Animation Events in Unity work).
Regarding your question about “Skip” and “End”, can you please clarify what you mean?
Are you asking about the “Default Stop Mode” options (Skip/Rewind/Hold) seen in the Cutscene inspector?
Let me know.
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Attachments:
SendGlobalMessage.png
Login
Register
By registering on this website you agree to our Privacy Policy.