If you like to change the Textures of the current CharacterBody, the Game always Crashs. So, here i need to write a bit more because this ony happens if a gun is equipped.
Expample:
If you like to Change the Materials OR the complete Model of the current in use CharacterBody, you can do itr in two ways:
SetObject(VObject object, string options); // Here you can also remap the Materials
and if you like to replace the complete Model you can also use:
VisualIdentity visId = charIdent.GetIdentity().GetVisualIdentity(); visId.SetBody(resourceName)
There are two problems:
1: If you just remap the Materials of the character, all the "HiddenMeshes" will visible. So, after the remap is done, the Meshes leaking with the worn Cloth items. In this case, it will be better to reset the current worn Cloth while using this on a Character.
2: VisualIdentity SetBody() -> This is working and also the "HiddenMeshes" are still correct.
But now the big Problem:
In both ways, the Game keeps crashing while the character have a weapon equipped! If you remove the weapon first, it works. Otherwise, the Game Crashs with:
Reason: Access violation. Illegal read by 0x7ff753ca0ded at 0x448