Two GetKeyframeSequence* APIs will become Plugin-only

A breaking change is going to ship in a few weeks, and this is the announcement for that. Two KSP methods that are currently usable from any scripts will become deprecated and only usable from Plugins:

KeyframeSequenceProvider:GetKeyframeSequence
KeyframeSequenceProvider:GetKeyframeSequenceById

Our metrics suggest that nobody is using these in game, but just in case you are, you should switch to KeyframeSequenceProvider:GetKeyframeSequenceAsync.

The reason for deprecation & enhanced security is the significant performance issues associated with calling these in a real-time context (although even in the plugin context you are better off using GetKeyframeSequenceAsync).

17 Likes

Did the CharacterScripts use these anywhere?,

No - these functions are currently mostly useful for editors; character scripts use Animation.AnimationId property to load animations.

3 Likes

What was the purpose of these functions in games? I don’t recall a way to use KeyFrameSequences in real time.

I recall using them in The Stalker: Reborn to measure the length of the animation and points where keyframe events occured. This was prior to the fixes @Davidii made.