Beispiel #1
0
        public static void Inject()
        {
            if (UnityEngine.Application.isPlaying)
            {
                return;
            }

            if (UnityEditor.EditorApplication.isCompiling)
            {
                UnityEngine.Debug.LogError("正在编译中,请编译完之后再点击!");
                return;
            }

            try
            {
                Func <HashSet <string> > fun = () => { return(new HashSet <string>(GenAutoExport.FixMarkIL())); };
                HotfixInject("./Library/ScriptAssemblies/Assembly-CSharp.dll", fun);

                string file = "./Library/PlayerScriptAssemblies/Assembly-CSharp.dll";
                if (System.IO.File.Exists(file))
                {
                    //Log.Debug("PlayerScriptAssemblies begin");
                    HotfixInject(file, fun);
                    //Log.Debug("PlayerScriptAssemblies end");
                }
            }
            catch (System.Exception ex)
            {
                wxb.L.LogException(ex);
            }
        }
Beispiel #2
0
        public static void Inject()
        {
            if (UnityEngine.Application.isPlaying)
            {
                return;
            }

            try
            {
                HotfixInject("./Library/ScriptAssemblies/Assembly-CSharp.dll", () => { return(new HashSet <string>(GenAutoExport.FixMarkIL())); });
            }
            catch (System.Exception ex)
            {
                UnityEngine.Debug.LogException(ex);
            }
        }