This commit is contained in:
CortexCore
2024-06-14 14:12:02 +08:00
parent 349877fe7a
commit ca93bd2c56
9 changed files with 24 additions and 24 deletions

View File

@@ -8,7 +8,7 @@ using UnityEngine.UIElements;
namespace BITKit.UX
{
#if UNITY_64
#if UNITY_5_3_OR_NEWER
public class UXApplicationFile : MonoBehaviour
{
[SerializeReference, SubclassSelector] private IApplicationFile applicationFile;

View File

@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Threading;
#if UNITY_64
#if UNITY_5_3_OR_NEWER
using AnotherFileBrowser.Windows;
#endif
using BITKit.Mod;
@@ -143,7 +143,7 @@ namespace BITKit.UX
return;
void OpenModInternal()
{
#if UNITY_64
#if UNITY_5_3_OR_NEWER
BIT4Log.Log<UXModService>("已进入文件对话框线程");
new FileBrowser().OpenFileBrowser(new BrowserProperties()
{
@@ -165,7 +165,7 @@ namespace BITKit.UX
switch (file.Extension)
{
case ".cs":
#if UNITY_64
#if UNITY_5_3_OR_NEWER
var code = await File.ReadAllTextAsync(path);
var assembly = BITSharp.Compile(code);
await ModService.Load(assembly,Path.GetDirectoryName(path));