Assets/TestMonobehaviour.cs
@@ -3,6 +3,7 @@ using UnityEngine; using Snxxz.UI; [XLua.Hotfix] public class TestMonobehaviour : MonoBehaviour { @@ -26,5 +27,26 @@ } } private void OnEnable() { Debug.Log("this is C# OnEnable !"); } private void OnDisable() { Debug.Log("this is C# OnDisable !"); } private void LateUpdate() { Debug.Log("this is C# LateUpdate !"); } void OnGUI() { if (GUI.Button(new Rect(10, 10, 300, 80), "Hotfix")) { LuaUtility.DoString("example.hotfix"); } } }