标签:getc cti span 切换 update inpu tran get function
using UnityEngine;
public class SwitchMaterial : MonoBehaviour
{
public Material M1, M2; // 贴图
void Update()
{ if (Input.GetKey(KeyCode.A)) { this.transform.GetComponent<Renderer>().material = M1; }
if (Input.GetKey(KeyCode.B)) { this.transform.GetComponent<Renderer>().material = M2; }
}
}
标签:getc cti span 切换 update inpu tran get function
原文地址:https://www.cnblogs.com/wayne1984/p/13516943.html