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

執行結果:



 

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

using UnityEngine;
using UnityEditor;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {

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




文章標籤
全站熱搜
創作者介紹
創作者 黃彥霖 的頭像
黃彥霖

彥霖 實驗筆記

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