Sprite.OverrideGeometry() doesn't work?

Hey Guys!
I’m trying to set the geometry on a Sprite but I’m getting this error every time I try and run the function.

“Not allowed to override geometry on sprite ‘squidward__handsome_squidward_by_millegas-d61zr7o’
UnityEngine.Sprite:OverrideGeometry(Vector2, UInt16)
SkewTest:Update() (at Assets/ScriptResources/Testing/SkewTest.cs:22)”

and my code is:

Vector2[] m_MeshVerts = m_CurrentSprite.vertices;
ushort[] m_MeshTris = m_CurrentSprite.triangles;
m_CurrentSprite.OverrideGeometry(m_MeshVerts, m_MeshTris);

I’ve also found this description on the blog:
“2D: Sprite geometry can now be overridden using Sprite.OverrideGeometry(Vector2 vertices, UInt16 triangles). Unity Pro only.”

Does anyone know why I’m getting this error? I have Unity Pro.

Apparently, Sprite.OverrideGeometry() only works when called as a part of texture import process. In other words, you can only call it from within AssetPostprocessor. OnPostprocessSprites(Texture2D texture, Sprite[] sprites) or AssetPostProcessor.OnPostprocessAllAssets(...).