UnityEditor4How To write a Preview Interface in Editor Inspector

Posted avi9111

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UnityEditor4How To write a Preview Interface in Editor Inspector相关的知识,希望对你有一定的参考价值。

A Preview Interface 

I tried to write some codes these days, until I saw this interface that The Network Information(Preview) is quit interecting

So, Let\'s try write one of this Preview by ourself

Code

需要(最好)放在,Editor目录下,否则打包会有问题

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
/// <summary>
/// preview 界面类,暂时给唯一这个类做Preview Interface: CameraEffectManager.cs;
/// 如需自定义,需要把这个类里CameraEffectManager 替换成你的类;
/// Preview 的 Title(Depth Mgr 统计数据)也需要替换;
/// </summary>
[CustomPreview(typeof(GameObject))]
public class DepthManagerPreview : Object

以上是关于UnityEditor4How To write a Preview Interface in Editor Inspector的主要内容,如果未能解决你的问题,请参考以下文章

How to write threats to validity?

write_to_file

3 Ways to Write Text to a File in Python

scrapy相关 Write items to MongoDB

learn to write thesis statement

Why to Write Shell Script