县总工会网站建设情况介绍,建设银行网站 查余额,电脑平面制图入门教程,为什么现在好多人嘲讽做核酸2个月前还在忙碌的找实习工作,看见招聘信息上面有一条熟悉扩展Unity编辑器,配合美工编程. 自己动手写完这个代码时候,发现写代码就像弹钢琴多么神奇. TestEdit类: using UnityEngine;
using System.Collections;
using UnityEditor;[CustomEditor(typeof(Test))]
public class …2个月前还在忙碌的找实习工作,看见招聘信息上面有一条熟悉扩展Unity编辑器,配合美工编程. 自己动手写完这个代码时候,发现写代码就像弹钢琴多么神奇. TestEdit类: using UnityEngine;
using System.Collections;
using UnityEditor;[CustomEditor(typeof(Test))]
public class TestEditor : Editor {void OnSceneGUI() {Test test (Test)target;//绘制文本框Handles.Label(test.transform.position Vector3.up * 2,test.transform.name : test.transform.position.ToString());//开始绘制GUIHandles.BeginGUI();//规定GUI显示区域GUILayout.BeginArea(new Rect(100, 100, 100, 100));if (GUILayout.Button(变大)) {test.transform.localScale new Vector3(test.transform.localScale.x1,test.transform.localScale.y1,test.transform.localScale.z1);}if (GUILayout.Button(向前移动)){test.Move();}GUILayout.Label(我在编辑Scene视图);GUILayout.EndArea();Handles.EndGUI();} } Test类: using UnityEngine;
using System.Collections;public class Test : MonoBehaviour {public void Move() {this.transform.Translate(Vector3.up * 10 * Time.deltaTime);}}转载于:https://www.cnblogs.com/plateFace/p/4287072.html