系统语言检测——SystemLanguage

作者:追风剑情 发布于:2016-1-29 14:19 分类:Unity3d

using UnityEngine; using System.Collections; public class SystemLanguageTest : MonoBehaviour { void OnGUI() { GUI.color = Color.green; //系统语言检测 GUI.Label(new...

阅读全文>>

标签: Unity3d

评论(0) 浏览(3019)

判断网络状态——NetworkReachability

作者:追风剑情 发布于:2016-1-29 14:10 分类:Unity3d

using UnityEngine; using System.Collections; public class InternetTest : MonoBehaviour { void OnGUI() { GUI.color = Color.green; GUI.Label(new Rect(20, 20, 500, 200),...

阅读全文>>

标签: Unity3d

评论(0) 浏览(7694)

输入管理器——Input Manager

作者:追风剑情 发布于:2016-1-28 15:50 分类:Unity3d

位于菜单 Edit->Project Settings->Input 字段解释参见: http://www.ceeger.com/Components/class-InputManager.html 对应脚本类Input http://www.ceeger.com/Script/Input/Input.html

阅读全文>>

标签: Unity3d

评论(0) 浏览(3942)

屏幕拾取

作者:追风剑情 发布于:2016-1-27 14:42 分类:Unity3d

示例一: 判断鼠标选中的物体 using UnityEngine; using System.Collections; public class ScreenPointToRayTest : MonoBehaviour { void Update() { if (Input.GetMouseButtonDown(0)) { ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2950)

动画事件——AnimationEvent

作者:追风剑情 发布于:2016-1-27 11:17 分类:Unity3d

一、创建一个Cube并选中,   二、创建个脚本并挂在Cube上 using UnityEngine; using System.Collections; public class AnimationEventTest : MonoBehaviour { void Event0 () { print("Event0")...

阅读全文>>

标签: Unity3d

评论(0) 浏览(3945)

协程——Coroutine

作者:追风剑情 发布于:2016-1-26 14:31 分类:Unity3d

using UnityEngine; using System.Collections; public class YieldTest : MonoBehaviour { public void Awake() { print("Begin Awake"); //StartCoroutine("FunCoroutine1"); ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(4786)

获取设备信息——SystemInfo

作者:追风剑情 发布于:2016-1-25 14:45 分类:Unity3d

using UnityEngine; using System.Text; using System.Collections; public class SystemInfoTest : MonoBehaviour { void Start() { StringBuilder sb = new StringBuilder(); ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(7416)

绘制纹理——GUI.DrawTexture()

作者:追风剑情 发布于:2016-1-21 11:22 分类:GUI

using UnityEngine; using System.Collections; public class DrawTextureTest : MonoBehaviour { public Texture aTexture; void OnGUI() { if (null == aTexture) { ...

阅读全文>>

标签: GUI

评论(0) 浏览(4652)

Profiler连接真机调试

作者:追风剑情 发布于:2016-1-20 10:44 分类:Unity3d

方案一、通过Wifi连接 方案二、通过ADB连接 步骤1: 打包   步骤2: 在cmd中执行adb 关闭windows的防火墙 adb forward tcp:54999 localabstract:Unity-包名   步骤3: 在unity中打开profiler窗口...

阅读全文>>

标签: Unity3d

评论(0) 浏览(9243)

NGUI绘制饼状图

作者:追风剑情 发布于:2016-1-18 19:22 分类:NGUI

using UnityEngine; using System.Collections; /// <summary> /// 饼状图 /// </summary> public class PieChart : MonoBehaviour { public UITexture texture; public int radius = 10;...

阅读全文>>

标签: NGUI

评论(0) 浏览(4416)

自定义光照模型

作者:追风剑情 发布于:2016-1-17 18:31 分类:Shader

一、创建Shader Shader "Custom/BlinnPhong" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _MainTint ("Diffuse Tint", Color) = (1,1,1,1)//色调 _SpecularColor ("Specular Color", Color)...

阅读全文>>

标签: Shader

评论(0) 浏览(3472)

对数组随机排序

作者:追风剑情 发布于:2016-1-13 20:15 分类:Algorithms

public static void RandSortArray(List<int> arr) { int size = arr.Count; int seed = 10000; //对给定数组随机排序, 每组排列的概率都为 1/size的阶乘 System.Random rand = new System.Ra...

阅读全文>>

标签: Algorithms

评论(0) 浏览(2706)

播放视频

作者:追风剑情 发布于:2016-1-13 17:23 分类:Unity3d

Android 把mp4文件放到Assets\StreamingAssets下面 using UnityEngine; using System.Collections; public class MovieTest : MonoBehaviour { void Start () { if (Application.platform ...

阅读全文>>

标签: Unity3d

评论(0) 浏览(2613)

动态创建纹理贴图

作者:追风剑情 发布于:2016-1-9 12:03 分类:Shader

using UnityEngine; using System.Collections; public class GenerateTexture : MonoBehaviour { public int widthHeight = 512; public Texture2D generatedTexture; private Material currentMater...

阅读全文>>

标签: Shader

评论(0) 浏览(3641)

静态注册Receiver

作者:追风剑情 发布于:2016-1-8 15:19 分类:Android

所谓静态注册Receiver,就是指在AndroidManifest.xml中配置。这样做的好处是app无需启动也能接收到广播消息。 示例: 静态注册GCM Broacase Receiver <!-- IGAWorks GCM Broacase Receiver --> <receiver //指定一个继承了android.content....

阅读全文>>

标签: Android

评论(0) 浏览(3739)

Path类

作者:追风剑情 发布于:2016-1-5 18:13 分类:C#

此类用于处理文件路径 using System; using System.IO; namespace PathTest { class Program { static void Main(string[] args) { string s; Console.WriteLi...

阅读全文>>

标签: C#

评论(0) 浏览(2843)

Windows安装OpenSSL组件

作者:追风剑情 发布于:2016-1-4 19:29 分类:其他

安装方法一:直接下载Win32 OpenSSL安装程序 http://slproweb.com/products/Win32OpenSSL.html 安装方法二:编译openssl源码 参考:http://www.cnblogs.com/ZhouL3777/archive/2012/10/21/2732890.html 安装方法也可在openss...

阅读全文>>

标签: 批处理

评论(0) 浏览(6438)

色阶

作者:追风剑情 发布于:2016-1-3 16:08 分类:Shader

色阶Shader Shader "Custom/LevelsShader" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _inBlack ("Input Black", Range(0, 255)) = 0 _inGamma ("Input Gamma", Range(0, 255)) = 1.61...

阅读全文>>

标签: Shader

评论(0) 浏览(3649)

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号