以下傅老師的Unity基礎(chǔ)課程超級(jí)簡單版筆記
順便安利一下傅老師,聲音超像周董的!人也很幽默,超喜歡的嘿嘿(?>?<)☆
鏈接附上感興趣就康康吧~
視窗
Toolbar 工作列
Hierarchy 樹狀圖
SceneView 3D工作區(qū)/關(guān)卡編輯器
Inspector 參數(shù)
Project 資源管理器
移動(dòng)
1. 移動(dòng)自己
- Fly mode: RMB(right mouse button) + WASDQE
- lock rotate(focus):F => alt + LMB
- create => 3D object =>cube
-復(fù)制物件 => ctrl + d
2. 移動(dòng)別人
原形(primatives)
- Cube
- Sphere 球體
- Quad 四邊形(4)
Plan 平面(>4) - Cylinder 圓柱體
- Capsule 膠囊
材質(zhì)球(material)
- Albedo(反射率 ≠ defuse): Texture
- Tiling(瓷磚): 重復(fù)次數(shù)
- Offset: 偏移量
- Metalic: 有跟沒有金屬?(天空盒有關(guān))
- Smoothness: 光滑(天空盒有關(guān))
- Normal: 法向量貼圖 (pbr material)
Based Coding
- 滑桿
[Range(1,15)]
public float z;
- 初始
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class test : MonoBehaviour {
//Variables
public int x;
public float y;
[Range(1, 15)]
public float z;
public string name;
// Use this for initialization
void Start () {
//一次性程式區(qū)
//print(name);
}
// Update is called once per frame
void Update () {
//重復(fù)性程式區(qū) 60次/s
print(gameObject.transform.position.x);
}
}
- 桌面顯示插件
void OnGUI()
{
GUI.Box(new Rect(Screen.width - 260,10,250,50),"Interaction");
GUI.Label(new Rect(Screen.width - 245, 30, 250, 30), "Up/Down Arrow : Go Forward/Go Back");
}
- 控制門上下
public class IronBar : MonoBehaviour {
public float startY;
// Use this for initialization
void Start () {
startY = transform.position.y; //save the initial position of bar
}
// Update is called once per frame
void Update () {
//print(gameObject.transform.position.x);
//put E bar UP/put Q bar Down
if(Input.GetKey(KeyCode.E))
{
if (transform.position.y <= (startY + 2.5f))
{
transform.position = new Vector3(transform.position.x, transform.position.y + 0.1f, transform.position.z);
}
}
else if (Input.GetKey(KeyCode.Q))
{
if (transform.position.y >= startY)
{
transform.position = new Vector3(transform.position.x, transform.position.y - 0.1f, transform.position.z);
}
}
}
- 開門按鈕碰撞
//不勾選Is Trigger
private void OnCollisionEnter(Collision cllision)
{
print("collision enter");
}
//勾選Is Trigger
private void OnTriggerEnter(Collider other)
{
print("trigger enter");
}
- 《Learning Physics Modeling with PhysX》
世界三大物理引擎(PhysX、Havok、Bullet)

Collider Manual Part1.

Collider Manual Part2.
FINISH 2020-3-5