07 2015 档案
摘要:1.隐藏文件夹以.开头的文件夹会被Unity忽略。在这种文件夹中的资源不会被导入,脚本不会被编译。也不会出现在Project视图中。2.Standard Assets在这个文件夹中的脚本最先被编译。这个文件夹中的脚本会被导出到Assembly-CSharp-firstpass, Assembly-U...
阅读全文
摘要:public class MyClass : MonoBehaviour { public int A; // Use this for initialization void Start () { } // Update is called once ...
阅读全文
摘要:看注释吧,写的很清楚了using System;using System.Collections.Generic;using System.Diagnostics;using System.Linq;using System.Text;using System.Threading.Tasks;nam...
阅读全文
摘要:转自http://www.xuanyusong.com/archives/3455using UnityEngine;using System.Collections;using UnityEditor; public class CameraExtension : Editor { publi...
阅读全文
摘要:效果图1、先准备好一个变灰shader。代码如下Shader "Custom/Gray"{ Properties { _MainTex ("Base (RGB), Alpha (A)", 2D) = "black" {} } SubShader { LOD 200 Tags { "Qu...
阅读全文
摘要:void Start () { const string MainTexVariableName = "_MainTex"; var renders = gameObject.GetComponentsInChildren(); var resMat = Resources.Load("Cha...
阅读全文
摘要:Shader "Custom/OutLine" {Properties { _Color ("Main Color", Color) = (.5,.5,.5,1) _OutlineColor ("Outline Color", Color) = (0,0,0,1) _Outline ("Out...
阅读全文