原创 unity給不聯網的客戶端添加密碼,使其只能在一臺電腦登錄

 第一組代碼:控制遊戲運行, using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; us

原创 Unity中代碼修改UI層級關係

/// <summary> /// 修改UI背景圖的層級 /// *******背景圖和顯示圖層必須在同意級別********** /// </summary> /// <param name="Tra

原创 歐幾里得算法

using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// 歐幾里得算法(求兩個正整數的最大公約數)

原创 獲取兩個字符串的最大子字符串

using System.Collections; using System.Collections.Generic; using UnityEngine; public class GetsTheLargestSubcharcate

原创 獲取Unity面板中的旋轉值

using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Reflection; //反編譯 /// <

原创 Ventuz5學習筆記

左右爲空的控件,放在Content(目錄)視圖中;對於上下爲空的控件,放在Hierarchy(層級)視圖中;View中各個工具的作用:1、ToolBox;    View==>ToolBox,打開ToolBox工具箱,其中包含了Ventu

原创 Unity中Shader學習筆記

1、Shader 中 Properties 屬性: Numbers and Sliders name ("display name", 2D) = "defaulttexture" {} name ("display name", Cub

原创 Unity中單點和多點觸控

Input.touchCount獲取當前的觸摸點數目,若爲1則是單點觸控,大於1則是多點觸控點擊事件用:Input.GetTouch(num).phase== TouchPhase.Began這樣的格式:1. usingUnityEngi

原创 Unity3D研究院之手遊開發中所有特殊的文件夾

這裏列舉出手遊開發中用到了所有特殊文件夾。1.EditorEditor文件夾可以在根目錄下,也可以在子目錄裏,只要名子叫Editor就可以。比如目錄:/xxx/xxx/Editor  和 /Editor 是一樣的,無論多少個叫Editor

原创 使用SteamVR v1.2.1版本手柄渲染問題的解決辦法

在SteamVR中找到 Scripts文件,找到SteamVR_UpdatePoses 腳本,添加到CameraRig中的eye攝像機中 

原创 使用SteamVR v1.2.3版本手柄渲染問題的解決辦法

找到 SteamVR_Render 腳本,然後將其中的341行代碼註釋了;再次打開場景,完美解決問題。

原创 Unity中攝像機圍繞物體旋轉的功能

當然啦其實圍繞旋轉的功能本身並不難:        // 拖動攝像機圍繞物體旋轉        if (Input.GetMouseButton(1))        {            x += I

原创 計算機中常用的數學知識

dot:點乘點乘,也叫向量的內積、數量積。求下來的結果是一個數;向量a . 向量b = | a | | b | cos<a,b>        //點乘Cross:叉乘叉乘,也叫向量的外積、向量積。求下來的結果是一個向量;| 向量c |