目录 9.AddForce(): 14.ref 和out 我们要想实现人物的移动,必须去通过C#脚本去实现,下面是一些知识: 一、部分知识: 1.RequireComponent类方法: 挂载组件给物体 [RequireComponent(typeof(Rigidbody))] 2.ToolTip特性: 类似于代码的注释功能,用于inspecter面板。 添加一个tooltip属性可以在instpector面板上提示注释 [Tooltip("Current players speed")] //注释:当下玩家的速度,会在inspecter面板上显示"Current players speed" public float currentSpeed; //接受注释的部分 效果: 3.[HideInInspector]: 顾名思义,隐藏在检查器中(inspecter),因为Public类型的变量会被Unity自动序列化,若你定义了公有的成员变量,但不想让它显示在面板上面,可以这样做: [HideInInspector]public Transform...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with out
Contact out, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack