Skip to content

Commit

Permalink
Merge pull request #297 from JasonXuDeveloper/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
JasonXuDeveloper authored Apr 11, 2022
2 parents 0e204fa + a8b090d commit 6fe0d29
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;
#if INIT_JE
using UnityEngine;
using System.Collections.Generic;
using System;
using System.Reflection;
Expand Down Expand Up @@ -343,3 +344,4 @@ void PushVector3(ref Vector3 vec, ILIntepreter intp, StackObject* ptr, IList<obj
ILIntepreter.PushObject(ptr, mStack, vec, true);
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;
#if INIT_JE
using UnityEngine;
using System.Collections.Generic;
using System;
using System.Reflection;
Expand Down Expand Up @@ -457,3 +458,4 @@ void PushVector3(ref Vector3 vec, ILIntepreter intp, StackObject* ptr, IList<obj
ILIntepreter.PushObject(ptr, mStack, vec, true);
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;
#if INIT_JE
using UnityEngine;
using System.Collections.Generic;
using System;
using System.Reflection;
Expand Down Expand Up @@ -458,3 +459,4 @@ public void PushVector3(ref Vector3 vec, ILIntepreter intp, StackObject* ptr, IL
CopyValueTypeToStack(ref vec, dst, mStack);
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if INIT_JE
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -224,4 +225,5 @@ public void PushJInt(ref JInt j, ILIntepreter intp, StackObject* ptr, IList<obje
CopyValueTypeToStack(ref j, dst, mStack);
}
}
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ private static string GenerateCrossBindingAdapterEditorCode(Type baseType,string
");
sb.Append(
@"[CustomEditor(typeof(");
sb.Append(clsName + "Adapter.Adapter");
sb.Append((nameSpace == clsName && !string.IsNullOrEmpty(nameSpace) ? nameSpace + "." : "") + clsName +
"Adapter.Adapter");
sb.Append(@"), true)]
public class ");
sb.Append(clsName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ public static string GetPrefix()
Debug.LogError(Setting.GetString(SettingString.NoticeText));
EditorUtility.DisplayDialog(Setting.GetString(SettingString.Notice),
Setting.GetString(SettingString.NoticeText), Setting.GetString(SettingString.Done));
if (Setting.Language == JEngineLanguage.English)
{
Application.OpenURL("https://docs.xgamedev.net/documents/0.7/");
}
else
{
Application.OpenURL("https://docs.xgamedev.net/zh/documents/0.7/");
}
InjectDefineSymbol();
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ internal class Setting : EditorWindow
/// <summary>
/// 语言
/// </summary>
private static JEngineLanguage Language
public static JEngineLanguage Language
{
get => (JEngineLanguage)(int.Parse(PlayerPrefs.GetString($"{_prefix}.PanelLanguage", "0")));
set => PlayerPrefs.SetString($"{_prefix}.PanelLanguage", value == JEngineLanguage.中文 ? "0" : "1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal class MenuItems
[MenuItem("JEngine/Open Documents",priority = 1999)]
public static void OpenDocument()
{
Application.OpenURL("https://xgamedev.uoyou.com");
Application.OpenURL("https://docs.xgamedev.net/");
}

[MenuItem("JEngine/Open on Github",priority = 2000)]
Expand Down
3 changes: 3 additions & 0 deletions UnityProject/Assets/Dependencies/LitJson/JsonMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,8 @@ public static void UnregisterImporters ()
{
custom_importers_table.Clear ();
}

#if INIT_JE

public unsafe static void RegisterILRuntimeCLRRedirection(ILRuntime.Runtime.Enviorment.AppDomain appdomain)
{
Expand Down Expand Up @@ -1167,5 +1169,6 @@ public unsafe static void RegisterILRuntimeCLRRedirection(ILRuntime.Runtime.Envi

return ILIntepreter.PushObject(__ret, mStack, result_of_this_method);
}
#endif
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if INIT_JE
using ILRuntime.Runtime.Enviorment;
using JEngine.AntiCheat;
using JEngine.AntiCheat.ValueTypeBinders;
Expand Down Expand Up @@ -27,4 +28,5 @@ public void Register(AppDomain appdomain)
appdomain.RegisterValueTypeBinder(typeof(JInt), new JIntBinder());
}
}
}
}
#endif
3 changes: 1 addition & 2 deletions UnityProject/Assets/Scripts/LoadILRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ public static void InitializeILRuntime(AppDomain appdomain)
RegisterValueTypeBinderHelper.HelperRegister(appdomain);
//Protobuf适配
ProtoBuf.PType.RegisterILRuntimeCLRRedirection(appdomain);
#endif

//LitJson适配
JsonMapper.RegisterILRuntimeCLRRedirection(appdomain);
#endif

//CLR绑定(有再去绑定)
Type t = Type.GetType("ILRuntime.Runtime.Generated.CLRBindings");
Expand Down

0 comments on commit 6fe0d29

Please sign in to comment.