LODselect.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LODselect : MonoBehaviour {
public Material mat;
// public int id;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void TestShader(int id)
{
Shader.globalMaximumLOD = id;
}
}
创建一个UIbutton
把上面的代码拖动进入button里面
设置UI属性