Calculating animation clip size in KB in code

Hi,

Is there a way to get animation clip size in code? It seems that there is no such property AnimationClip.

If no, what is the equation used to calculate it from curves? I’ve tried to figure it out from the breakdown displayed in the editor (Constants/Dense/Stream curves) but the ratio<->size is different for each clip, therefore I believe there is another factor which I am not aware of.

Any help, advice is appriciated!

Hello.
I know it is quite a old post.
Digging in Unity source I found the class AnimationClipStats that collect all information in the AnimationClipEditor.
The sole issue is that this class is internal, therefore not accessible for us to use.
(UnityCsReference/Editor/Mono/Inspector/AnimationClipEditor.cs at master · Unity-Technologies/UnityCsReference · GitHub : l.688)
It could be really great if this could be made accessible for us in Unity 2019 and after.
It seems there is not a loads of informations as for how to estimate size of an animation clip.