webnetweaver Posted September 23, 2025 Posted September 23, 2025 (edited) Im using the Blend2d.cs sample script from the ObjectMeshSkinned API documentation, https://developer.unigine.com/en/docs/latest/api/library/objects/class.objectmeshskinned?subnavView=brief&subnavSort=name. The script works but there were a few things I needed to change first because the script has some syntax errors when running under version 2.20. int id = meshSkinned.AddAnimation(animations[i].asset.Path); I had to comment out this line because this method no longer exists meshSkinned.SetAnimation(meshSkinned.NumLayers - 1, id); I had to comment out this line because this method no longer exists and replace it with: meshSkinned.SetLayerAnimationFilePath(meshSkinned.NumLayers - 1, animations[i].asset.Path); int numFrames = meshSkinned.GetNumAnimationFrames(id); I had to comment out this line because this method no longer exists and replace it with: int numFrames = meshSkinned.GetLayerNumFrames(meshSkinned.NumLayers - 1); meshSkinned.setLayerFrame(i, frame); This method exists but S in setLayer needs to be capitalized: meshSkinned.SetLayerFrame(i, frame); After making these changes the script works fine under 2.20. And my character has blend space animations. :) Edited September 23, 2025 by webnetweaver
Solution fox Posted September 23, 2025 Solution Posted September 23, 2025 Hi @webnetweaver! Seems like the update has skipped this snippet. We'll have it fixed ASAP! Thanks for pointing out! 1
Recommended Posts