I encountered a problem with GetSectionBefore where calling it would skip to a later section rather than the one before it, turns out one section in the list got out of order for some reason. Adding a line to order the list fixed the problem for me:
1
2
3
4
5
///Get a Section whos time is less specified time
publicSection GetSectionBefore(floattime){
sections=sections.OrderBy(s=>s.time).ToList();
returnsections.LastOrDefault(s=>s.time<time);
}
There is probably a place further up the class hierarchy that would be better to do this instead of each time this method is run, but works for a quick fix and wanted to let ya know.
Sorry for the late reply and thanks for the report and fix.
I will try to find and reproduce why this happened in the first place (sections get out of order).
I can’t think of any way this would happen though. If you have have any leads, please let me know.
By the way, it would probably be better to add this OrderBy fix at the end of Validate method (in that same CutsceneGroup.cs class), so that it’s not called every time indeed.
Thanks again!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.