Unity处理Hierarchy面板上的一些特殊的对象的特殊标识

本文介绍了如何在Unity中处理Hierarchy面板上具有特殊组件的对象,通过监听Unity事件EditorApplication.hierarchyWindowChanged和EditorApplication.hierarchyWindowItemOnGUI,在AssetPostprocessor派生类中实现对象的特殊标识,以避免在资源导入后处理时导致编辑器卡顿。
摘要由CSDN通过智能技术生成

孙广东  2015.5.27

转载请注明出处:http://blog.csdn.net/u010019717  

   

要实现下面的效果:、其实主要是要标识一些比较特殊的对象(或者是具有特殊组件的对象)

实现方式就是监听Unity的一些事件被


  EditorApplication.hierarchyWindowChanged += HierarchyWindowChanged;
EditorApplication.hierarchyWindowItemOnGUI += HierarchyWindowItemOnGUI;

需要指明的是这个类是 AssetPostprocessor的派生类。

资源导入后处理类,   最好不要在这里执行太多费时的操作,否则Unity编辑器会卡顿,是在执行预编译和导入处理在编辑器的右下角都有小圆圈再转会有长时间的卡顿的

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using DajiaGame.Px;
using Un
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
QHierarchy is an editor extension that adds several often used functions to hierarchy window: - Displaying the icon of a GameObject - Showing / hiding a GameObject - Locking / unlocking a GameObject - Prevent selection of locked GameObject - Displaying tag and layer of a GameObject - Displaying color label for a GameObject - Displaying the icon of MonoBehaviour script attached to a GameObject - GameObject can be showed / hidden only for edit-time, and the visibility state will return during play-time - Displaying the number of children of a GameObject - Displaying the number of vertices and triangles of the GameObject (can display the number including all children) - Change the colors of icons and labels - Displaying custom icon for any layer - Displaying custom icon for any tag - Displaying prefab connection status - Displaying static flags icon of GameObject - Displaying the error icon (MonoBehaviour script missing / Reference property is null / String property is empty / Callback of event is missing) - Displaying icons of all scripts that attached to a GameObject - Showing / hiding wireframe objects - Enable / Disable MeshRenderer - Order of icons can be changed - Displaying the list of GameObjects in the form of a tree - Option to add right indent (useful if you use other plugins that add another icons to the hierarchy window) - Any feature can be disabled - Source Code Included. Website | Documentation | Contacts Compatible with Unity 4.6.0+ / 5.0.1+ / 2017.1+ / 2018.1+
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值