using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Setmesh : MonoBehaviour
{
/// <summary>
/// 从面板获取物体的组件MeshRenderer
/// </summary>
public MeshRenderer mesh;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
/// <summary>
/// 切换材质的函数
/// </summary>
/// <param name="mat">材质参数,从面板赋予</param>
public void MeshRender(Material mat)//通过添加事件直接调用
{
mesh.material = mat;
}
}