using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System; [ExecuteInEditMode] [CustomEditor(typeof(testxx))] public class testxxEditor : Editor { [SerializeField] public float slider_value = 0.3f;…
1.unity的脚本模板 新版本unity中的C#脚本有三类,第一类是我们平时开发用的C# Script:第二类是Testing,用来做单元测试:第三类是Playables,用作TimeLine中管理时间线上每一帧的动画.声音等.我们点击创建脚本时,会自动生成unity内置的一套模板: using System.Collections; using System.Collections.Generic; using UnityEngine; public class NewBeha…
1.为什么在Inspector视图中有的脚本前面有勾选框,有的脚本前面没有? 当我想要禁用一个脚本时,发现脚本前面没有勾选框,有的却有. 解决办法:在脚本中添加start方法,然后就有勾选框了. 原因:不明. 2.禁用脚本后发现脚本中的代码仍然在运行,为什么呢? 类似于OnTriggerEnter()的事件监听方法在脚本被禁用后,仍然会执行. 原因:不明.或许了解下这类方法执行的原理有助于知道为什么. 3.C#属性简写的原理分析: private int fish; public int Fis…
Unity中的Inspector面板可以显示的属性包括以下两类:(1)C#以及Unity提供的基础类型:(2)自定义类型,并使用[System.Serializable]关键字序列化,比如: [System.Serializable] public class TestClass { public Vector3 vec = Vector3.zero; public Color clr = Color.green; } 也可以使用[System.NonSerialized]标记不需要显示的属性,…
转载:https://unity3d.com/learn/tutorials/topics/best-practices/assets-objects-and-serialization Assets, Objects and serialization Checked with version: 2017.3 - Difficulty: Advanced This is the second chapter in a series of articles covering Assets, Re…
http://www.procedural-worlds.com/blog/best-free-unity-assets-categorised-mega-list/ BEST FREE UNITY ASSETS – OVER 200 CURATED QUALITY ASSETS Kick-start your game with a categorized curated list of over 200 high quality FREE assets! FREE as in AWESO…
转自Unity 3d for ios 这篇文章还可以在这里找到 英语 Learn how to use Unity to make a simple 3D iOS game! 这篇教材是来自教程团队成员 Christine Abernathy, 他是Facebook的开发支持团队的工程师.Unity是最为流行的游戏引擎之一.这是有充分缘由的:Unity有一个让它非常容易上手的强大的可视化编辑器,功能强大,好的社区支持,有吸引力的价格,等等!如果你渴望尝试Unity,没有比这篇教程更适合你的了!在…