Using GameAnimationUtils::ShowMesh to hide a mesh on a model imported after the latest update no longer works. This method still works for models imported pre 1.8 and their meshes.
I've attached below some screenshots showing the issue. The pants I have imported pre 1.8 and have two separate meshes for high and low boots. You can see the high trouser mesh hides with this code snippet.
int meshIdx = GameAnimationUtils.FindMeshIndex(owner, "M41_Trousers")
GameAnimationUtils.ShowMesh(owner, meshIdx, false)
But when importing a new model, in this case a my thompson mag pouch I made in blender 4.5. This no longer works. I've reimported with their meshes no longer merged in the import settings already.
int meshIdx = GameAnimationUtils.FindMeshIndex(owner, "Mag1_Top")
Print("Mag1_Top")
Print(meshIdx)
GameAnimationUtils.ShowMesh(owner, meshIdx, false)
I used the print statements to debug and the meshIdx is print a value of 1 so it is being found.
I even made a small test.fbx with just a sphere and a square with the same results. I've attached this along with the txo and xob files that where created when I imported the model.
Condensed Steps:
1. Download the Test.FBX zip file I sent and or go into blender and make your own model real quick using a sphere and a cube.
2. Create a subscene of MPTest
3. Drop the xob in the world to create a prefab or duplicate any pouch prefab and set the xob to be your test model.
4. Use this code snippet and observe the mesh not hiding.
int meshIdx = GameAnimationUtils.FindMeshIndex(owner, "Sphere")
Print("Sphere")
Print(meshIdx)
GameAnimationUtils.ShowMesh(owner, meshIdx, false)