Files
Fishing2NetTest/Assets/Plugins/FairyGUI/Examples/RenderTexture/RenderTextureMain.cs
2026-03-12 00:22:03 +08:00

28 lines
583 B
C#

using UnityEngine;
using FairyGUI;
public class RenderTextureMain : MonoBehaviour
{
GComponent _mainView;
Window3 _testWin;
void Start()
{
Application.targetFrameRate = 60;
Stage.inst.onKeyDown.Add(OnKeyDown);
_mainView = this.GetComponent<UIPanel>().ui;
_testWin = new Window3();
_mainView.GetChild("n2").onClick.Add(() => { _testWin.Show(); });
}
void OnKeyDown(EventContext context)
{
if (context.inputEvent.keyCode == KeyCode.Escape)
{
Application.Quit();
}
}
}