工具列會出現 Loli/Moe 選項,點下去會列印 Moe

執行結果:

Unity - A.unity - New Unity Project 48 - PC, Mac & Linux Standalone DX11

Unity - A.unity - New Unity Project 48 - PC, Mac & Linux Standalone DX11_2  

// 方法一定要宣告成 static 才行

using UnityEngine;
using UnityEditor;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {

    [MenuItem ("Loli/Moe")]
    static void LoliLove () {
        print ("Moe");
    }
}




arrow
arrow
    全站熱搜

    黃彥霖 發表在 痞客邦 留言(0) 人氣()