That is actually a non-wanted behaviour. Thanks for pointing this out. I will need to find a way around this, but the code in question, can be found in Cutscene.OnSampleEnded (and OnSampleStarted) method. OnSampleEnded, is called when a cutscene’s first or last frame is called (from within Sample method). Sample on the other hand is called the same both in editor and in runtime.
Probably a quick fix would be to only call OnSampleEnded and OnSampleStarted if the cutscene is actively playing (isActive). This way, a subcutscene (which is not actually active) will not trigger this. The change would be to locate the OnSampleStarted and OnSampleEnded calls within the Ctuscene.Sample method and do this:
1
2
3
4
5
6
7
8
9
10
11
12
13
//...
if(!Application.isPlaying||isActive){
OnSampleStarted();
}
//...
if(!Application.isPlaying||isActive){
OnSampleEnded();
}
//...
Let me know if this change works for you.
Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.