
unity3d 扩展编辑器
文章平均质量分 58
aa20274270
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Unity3D 获得编辑器的Log信息
1. 注册 Application.logMessageReceived += HandleLog; 2. 注销 Application.logMessageReceived -= HandleLog; 3. 实现函数 void HandleLog(string condition, string stackTrace, LogType type) {原创 2015-09-08 23:45:20 · 2867 阅读 · 0 评论 -
Screen.Width 和 Screen.Height
Unity3D 5.5.1.p1 1. 在EditorWindow下 OnGUI里面,Screen.Width 和 Screen.Height 返回 EditorWdinow的Width 和Height,如果不是在OnGUI的话,就返回GameView的。原创 2017-05-26 19:31:55 · 5682 阅读 · 0 评论 -
Unity Editor Window Zooming
http://martinecker.com/martincodes/unity-editor-window-zooming/原创 2016-12-12 11:59:51 · 2058 阅读 · 0 评论 -
扩展 Shader 编辑器
1. 参考: MaterialPropertyDrawer 官方文档 2. 参考: http://forum.unity3d.com/threads/unity-shader-define-issue.251512/原创 2015-08-26 11:00:37 · 808 阅读 · 0 评论 -
AssetPostprocessor 使用
using UnityEngine; using UnityEditor; using System.IO; class AssetPostprocessor : AssetPostprocessor { static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, strin原创 2017-01-11 11:01:42 · 1685 阅读 · 0 评论 -
Unity Editor下 修改 Prefab
[MenuItem("所有Prefab添加PrefabInfoHerlper组件")] static void AddPrefabInfoHelper() { UnityEngine.Object[] selObjs = Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.DeepAsset原创 2017-01-09 18:55:37 · 8653 阅读 · 0 评论 -
MemoryTracker
using UnityEngine; using System.Collections; using System.Collections.Generic; public class MemoryTracker : MonoBehaviour { Vector2 scrollPositino = Vector2.zero; Rect windowRect = new Rect(原创 2017-01-04 12:03:51 · 519 阅读 · 0 评论 -
Unity3D ScriptableObject 一些坑
一般在做编辑器的时候会给策划做一些脚本或者ScriptableObject,让策划进行或拽赋值等操作。举个例子假如开始策划说我只需要拖放一个GameObject,但是N天以后策划说这里想拖多个GameObject. 那么如果开始序列化的数据不是List那么就悲剧了,数据结构一变策划之前拖拽过的工作都玩白做了。。有些人为了做兼容不得不在写一个新的数据结构让策划来填写,但是这样就得是多个变量了转载 2016-12-12 16:19:21 · 6512 阅读 · 0 评论 -
Unity3D 自动添加Fbx Animation Event
using UnityEngine; using System.Collections; using UnityEditor; using System.Collections.Generic; public class Test { [MenuItem("Assets/生成动作帧事件")] public static void GenerAnimationEvent1()原创 2016-09-13 19:01:54 · 3027 阅读 · 0 评论 -
模拟粒子系统(ParticleSystem.Simulate)
using UnityEngine; using UnityEditor; [ExecuteInEditMode] public class MyWindow : EditorWindow { private GameObject _curEffect; private float _curValue = 0; private float _preTime;原创 2016-06-19 18:54:00 · 5891 阅读 · 3 评论 -
ScriptableWizard
using UnityEngine; using UnityEditor; using System.Collections; // A Wizard class that generates it's fields from public properties public MyScriptableWizard : ScriptableWizard { //----------------原创 2016-06-16 21:48:27 · 475 阅读 · 0 评论 -
PropertyDrawer
Ingredient.cs using UnityEngine; using System.Collections; using System.Collections.Generic; [System.Serializable] public enum IngredientUnit { Spoon, Cup, Bowl, Piece } // Custom serializable c原创 2016-06-12 15:29:38 · 1314 阅读 · 0 评论 -
OnBeforeSerialize And OnAfterDeserialize
using UnityEngine; using System.Collections.Generic; public class test : MonoBehaviour, ISerializationCallbackReceiver { public List _keys; public List _values; //Unity doesn't know ho原创 2016-06-12 15:31:33 · 2467 阅读 · 0 评论 -
Unity3D 扩展 Scene
[CustomEditor(typeof(Test))] // 可以做成,直接把Prefab拖到场景中,自动合并, // 获得是,地点选择,就合并到那个中 public class TestEditor : Editor { void InitStyle() { _boneNameStyle.normal.textColor = Color.r原创 2015-11-26 21:50:05 · 775 阅读 · 0 评论 -
Unity3D 存储 .asset 文件 例子
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Node : ScriptableObject { public string Name; } using System.Collections; using System.Collecti...原创 2018-09-29 12:29:25 · 2485 阅读 · 0 评论