Sometimes, when I try to use the built in Save function (for checkpoints to load on death), I get the following error:
Uncaught (in promise) TypeError: this._wasOverJumpthru.GetUID is not a function
at PlatformInstance.SaveToJson (runtime.js:9:507)
at BehaviorInstance.SaveToJson (behaviorInstance.js:4:172)
at Instance.SaveToJson (instance.js:28:407)
at objectClass.js:30:45
at Array.map (<anonymous>)
at ObjectClass._SaveToJson (objectClass.js:30:30)
at C3Runtime._SaveToJsonString (runtime.js:105:420)
at C3Runtime._DoSaveToSlot (runtime.js:102:335)
at C3Runtime._HandleSaveOrLoad (runtime.js:100:143)
at C3Runtime.Tick (runtime.js:76:186)
Has anyone ever seen this before? This only happens on 2 specific (and large) layouts with a lot of objects using the Jumpthru behavior.
Case 1: Sometimes when you load the level, some of my Jumpthru objects get despawned immediately (the level changes over the course of the story). The game saves when the player performs a specific action.
Case 2: The game tries to save 0.1s after the layout starts (to give dynamically-created objects time to spawn). No Jumpthru objects are despawned by this point.
Take note that the player object (with the Platform behavior) is dynamically created at the start of the layout, as there are multiple players to choose from. Could this be related?
EDIT: Deleting every Jumpthru object from the layout ahead of time makes the bug go away, so they are definitely the culprit here. I just don't know how to fix this without drastically altering my level design to work without them.
EDIT 2: Statically placing the player object (instead of spawning it dynamically) does not help.