原创 簡單的拖拽物體到物品欄

代碼:需要移動物體上的代碼(這裏是血瓶) using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEn

原创 簡單實現緩存池

學習筆記 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Pool2 : MonoBehav

原创 同步異步加載Resources下的資源

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public cla

原创 安全獲取到UI的width和height

RectTransform Rect = transform.GetComponent(); Debug.Log(Rect.rect.width+Rect.rect.height); 也可以獲取到很多的信息,請一一嘗試

原创 unity點擊拖拽Cube模型旋轉,Cube模型的鼠標點擊,擡起等事件

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; using Unit

原创 unitysdk jdk下載網址

http://www.androiddevtools.cn/

原创 Kinect的Kinect Manager腳本簡介

Sensor Height How high above the ground is the sensor, in meters. (傳感器離地面有多高,單位是米) Sensor Angle Kinect elev

原创 unity攝像機旋轉帶有滑動效果(自轉)

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; pu

原创 點到物體滑動鼠標物體旋轉

using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class Rata : Mo

原创 unity多場景切換

場景A、B、C C用作中轉場景,A跳轉到B,經過C場景 首先創建腳本GetScreenName獲取到需要跳轉的名字 public class GetScreenName { public string m_ScreenName

原创 Kinect簡單的動作識別

1創建空項目 2.保存項目 3.創建空物體 4.在空物體上添加 上圖腳本簡介:https://blog.csdn.net/qiao2037641855/article/details/101058390 和 5.創建腳本放到空

原创 Unity webgl與html通信

1、先來Unity3d官方鏈接 2、調用html中的方法(老版本Application.ExternalCall();已經棄用) 首先在Unity中創建文件夾Plugins,在文件夾中創建文本改爲後綴名爲( .jslib)的文件,

原创 Unity攝像頭跟隨鼠標旋轉

using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraMove : MonoBehavi

原创 Unity發佈WebGl自適應瀏覽器

在index.html中需要添加的基本上就這些 <!-- 在這裏設置遊戲的 整個界面是100%填充設備 --> <div id="gameContainer" style="width:100%; height:10

原创 Unity旋轉攝像頭第一人稱視角

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; publ