unity脚本特性

使用前先写[]

例:[range(0,100)]

1.SerializeField:序列化字段,用于显示脚本中的私有变量在unity中

2:Hidininspector::用于在编译器中隐藏字段

3:range(0.100):设置某些变量的值在0-100之间



unity产生随机数:

private int d = random.range(1.101)

this.enable= true;(启用脚本)



你可能感兴趣的:(unity脚本特性)