原创 unity3d 獲取cpu 型號 android

很多人獲取android cup型號並不是很準備 這裏發佈一下 獲取cup比較準確的解決方案,直接上代碼 C# public static string GetCPU() { string cpu

原创 unity3d 獲取OpenGL版本號 android

unity3d 獲取OpenGL版本號 android opengl3.0 返回值爲30000 廢話不多直接上代碼 public static string GetOpenGL() { string

原创 unity3d 畫弧面mesh,拋物線mesh

unity3d 畫弧面mesh,拋物線mesh 廢話不多,直接上圖,有圖有真相 直接上代碼 using UnityEngine; using System.Collections; public class CreateArcSu

原创 unity shader 水效果

Shader "Shader Forge/Fx_water_VX" { Properties { _NQ_Tex ("NQ_Tex", 2D) = "white" {} _NQ_pw ("NQ_

原创 unity shader 倒影實現

Shader "test/1111" { Properties { _Diff ("Diff", 2D) = "white" {} _FloorPos("FloorPos",Vector) = (0,0

原创 3D引擎,unity3d,矩陣,shader,NGUI

3D引擎是將現實中的物質抽象爲多邊形或者各種曲線等表現形式,在計算機中進行相關計算並輸出最終圖像的算法實現的集合。 3D引擎就像是在計算機內建立一個“真實的世界” 多邊形在透視攝像機下的變換過程(注意scene是開啓了2d按鈕,Ga

原创 unity 內存優化,調整mono的gc頻率,起到內存優化

1:下載對應unity版本的mono 2:查找mono文件mono-unity\mono\mini.c進行如下修改 可以在代碼的#include之後加上:此段代碼導出修改gc頻率的方法個變量 typedef unsigned long

原创 unity UI shader 之Overlay Mode

// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) Shader "UI/PS

原创 unity3d Antialiasing 抗鋸齒效果 之渲染效果提升

廢話不多上代碼 C# (肯定是綁定在攝像機上面的,你懂的;注意攝像機一定要是Skybox或者SolidColor模式) using System; using System.Collections.Generic; using U

原创 unity3d LightMap 跨平臺的問題 和 烘焙技巧

科普名詞解釋: 全局照明(GI):是指除了直接光之外包括天空,物件之間間接光照的總和。 環境光遮蔽(AO):是指間接光在物件間相互遮擋反射不充分導致的微弱陰影。通常在直接光照暗部的接縫處纔會比較明顯。 天光:從頭頂來的天空顏色造成的

原创 unity3d 截圖製作視頻代碼

先來效果 直接上代碼 #if UNITY_EDITOR using UnityEngine; using System.Collections; using System.IO; using System; public class

原创 UV動畫(波紋)

Shader "Custom/FragmentAnimShader" { Properties { _MainTex ("Texture", 2D) = "white" {} _F("F",Ran

原创 unity3d bloom效果 之渲染效果提升

廢話不多上代碼 C# (肯定是綁定在攝像機上面的,你懂的) public class MobileBloom : MonoBehaviour { //分辨率 public int downSample = 1;

原创 unity3d lua使用錯誤 在同時使用require()lua 是時候最多只能有512個是否會出現adnroid和ios 奔潰

unity3d lua使用錯誤 在同時使用require()lua 是時候最多只能有512個是否會出現adnroid和ios 奔潰

原创 unity3d shader 代碼控制開關屬性

直接上代碼shader Shader "ShaerTest" { Properties { _Color("Tint",Color ) = (0.5,0.5,0.5,0.5) _MainTex ("Base (RGB) T