Ejemplo n.º 1
0
        void Start()
        {
            var rMethodInfos = this.GetType().GetMethods();

            for (int i = 0; i < rMethodInfos.Length; i++)
            {
                if (rMethodInfos[i].Name == "Test")
                {
                    Delegate rDelegate = Delegate.CreateDelegate(typeof(Action <UnityEngine.Object>), this, rMethodInfos[i]);
                    Action <UnityEngine.Object> rActionDelegate = rDelegate as Action <UnityEngine.Object>;

                    Debug.LogError("Te1");
                    rActionDelegate(null);
                }
            }

            HotfixManager.Instance.Initialize();
            CoroutineManager.Instance.Initialize();
            HotfixEventManager.Instance.Initialize();

            LoadHotfixDLL();
            string rPrefabPath = "Assets/Test/HotfixTest/Base/HotfixTest1.prefab";

            GameObject rTestPrefab = null;

#if UNITY_EDITOR
            rTestPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath(rPrefabPath, typeof(GameObject)) as GameObject;
#endif
            this.Canvas.transform.AddChild(rTestPrefab, "UI");
            GameObject.Instantiate(rTestPrefab);

            HotfixObject rHotfixObj = HotfixManager.Instance.Instantiate("WindHotfix.Test.Class3");
            rHotfixObj.Invoke("Test");
            rHotfixObj.InvokeParent("WindHotfix.Test1.TClass3`1", "Test");
        }
Ejemplo n.º 2
0
        IEnumerator Start()
        {
            CoroutineManager.Instance.Initialize();
            yield return(HotfixApp.Instance.Load("KnightHotfixModule"));

            string rPrefabPath = "Assets/Test/HotfixTest/Base/HotfixTest1.prefab";

            GameObject rTestPrefab = null;

#if UNITY_EDITOR
            rTestPrefab = UnityEditor.AssetDatabase.LoadAssetAtPath(rPrefabPath, typeof(GameObject)) as GameObject;
#endif
            this.Canvas.transform.AddChild(rTestPrefab, "UI");
            //GameObject.Instantiate(rTestPrefab);

            HotfixObject rHotfixObj = HotfixApp.Instance.Instantiate("WindHotfix.Test.Class3");
            rHotfixObj.Invoke("Test");
            rHotfixObj.InvokeParent("WindHotfix.Test1.TClass3`1", "Test");
        }