I have this model in unity https://www.assetstore.unity3d.com/en/#!/content/4331
What I want to do is make one red samurai as the player and I want the same model to be as a prefab but with blue tinted texture instead. I managed to copy the base texture and use color balance in Gimp to change the red parts into blue, so now I have a blue texture. I also created a material with this new blue texture.
The problem I have is when I change material on the Blue Samurai to be with the blue texture it also changes the texture on the Red Samurai though I have those two game objects as a prefabs as well. I guess I change the exact same subobject of the red and blue samurai that is holding the body of the samurai.
If I select the body subobject and then press right click → “select prefab” on “plane007” it shows on the same exact prefab subobject holding the body of the samurai
How can I separate and make two prefabs with different texture/material?
I cannot see “duplicate” button in the prefabs folder.
sys12
2
Attach script to your prefab with 2 public fields like:
public Material m_material;
public Texture2D m_texture;
And apply them to your mesh renderer.
Drag your textures and materials to the script of each gameobject created by prefab in editor.
Probably this is a noob question but at the time I was confused what do I do wrong. I found an even better way to assign different material to the two Samurais. If you check the images carefully, they have Skinned Mesh renderer which allows you to select different material. I did tried that and now I have two different Ninjas, blue and red.
I would keep it just so somebody learning Unity might find this question useful. But yes above solutions work as well.
