📜  unity 检查器滑块 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:21.082000             🧑  作者: Mango

代码示例1
public class Example : MonoBehaviour
{
    // This integer will be shown as a slider,
    // with the range of 1 to 6 in the Inspector
    [Range(1, 6)]
    public int integerRange;

    // This float will be shown as a slider,
    // with the range of 0.2f to 0.8f in the Inspector
    [Range(0.2f, 0.8f)]
    public float floatRange;
}