有动画的蒙皮网络渲染器例如怪物
没动画的用的网格渲染器例如武器
?先导入贴图,再导入模型,贴图和模型就会自动匹配
控制隐身和换装的代码
public class Test : MonoBehaviour
{
public SkinnedMeshRenderer body;
public Material m1;
public Material m2;
// Start is called before the first frame update
void Start()
{
//transform.GetComponent<MeshRenderer>().enabled = false;
//transform.GetComponent<SkinnedMeshRenderer>().enabled = false;
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.A))
{
//换为第一套的衣服
body.material = m1;
}
else if (Input.GetKeyDown(KeyCode.S))
{
//换为第二套的衣服
body.material = m2;
}
}
}
|