[增加]1. 增加UI代码生成器的入口
This commit is contained in:
parent
13a6e245f8
commit
a2732a550a
|
@ -0,0 +1,27 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameFrameX.UI.UGUI.Editor
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
internal static class UICodeGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成UI代码
|
||||
/// </summary>
|
||||
[MenuItem("GameObject/UGUI/Code", false, 1)]
|
||||
static void Code()
|
||||
{
|
||||
// Debug.Log("Test");
|
||||
if (Selection.activeObject)
|
||||
{
|
||||
var activeObject = (GameObject)Selection.activeObject;
|
||||
if (activeObject)
|
||||
{
|
||||
var ugui = activeObject.GetComponent<GameFrameX.UI.UGUI.Runtime.UGUI>();
|
||||
Debug.Log(ugui);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1ea4334b0c0c8684f9f934d6719391a2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue