美文网首页
unity脚本特性

unity脚本特性

作者: 牧码人65535 | 来源:发表于2020-05-05 11:43 被阅读0次

使用前先写[]

例:[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脚本特性

      本文链接:https://www.haomeiwen.com/subject/yybddctx.html