|
Hello, So, I have a player fbx that was imported with some clothing items. Simply copying the shirt in the editor does not leave me with a copy that I can freely use...the bones will still be bound to the original fbx\gameobject. To overcome this, I make a copy of the object in code by taking the verts, bones, uvs, etc of the original and make a skinned mesh game object. This way, the new mesh is no longer bound to the original object, and I can apply this new object to another game object (that has the same bone structure) So far, everything works as intended. However, I dont want to do this operation every time I want to access a certain shirt...I want to make prefabs out of these newly copied items. So, in an editor script, I have code like this:
However, the prefabs that are made from this code do NOT have the mesh data. It has the name and bone structure, but no mesh data. The copied game objects I'm using to make the prefab have all the info I need...but making a prefab out of it in code or by hand in the editor(drag and drop) leaves me with blank items. any ideas?
(comments are locked)
|
