1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using UnityEngine;
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace BITKit
|
||||
public static event Action<ConsoleColor> OnSetConsoleColor;
|
||||
public static event Action OnNextLine;
|
||||
private static Type currentType;
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
//[HideInCallstack]
|
||||
#endif
|
||||
public static void Log(object x, ConsoleColor color = ConsoleColor.White)
|
||||
@@ -33,7 +33,7 @@ namespace BITKit
|
||||
OnSetConsoleColor?.Invoke(color);
|
||||
OnLog?.Invoke(x?.ToString());
|
||||
}
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[HideInCallstack]
|
||||
#endif
|
||||
public static void Log<T>(object x, ConsoleColor color = ConsoleColor.White)
|
||||
@@ -50,21 +50,21 @@ namespace BITKit
|
||||
|
||||
currentType = typeof(T);
|
||||
}
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[HideInCallstack]
|
||||
#endif
|
||||
public static void LogException(Exception e)
|
||||
{
|
||||
OnException?.Invoke(e);
|
||||
}
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[HideInCallstack]
|
||||
#endif
|
||||
public static void Warning(object x)
|
||||
{
|
||||
OnWarning?.Invoke(x.ToString());
|
||||
}
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[HideInCallstack]
|
||||
#endif
|
||||
public static void Warning<T>(object x)
|
||||
|
@@ -4,12 +4,12 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Text;
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using UnityEngine;
|
||||
#endif
|
||||
namespace BITKit
|
||||
{
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[Serializable]
|
||||
public sealed class ExecuteCommandAction : IAction
|
||||
{
|
||||
|
@@ -253,7 +253,7 @@ namespace BITKit.Mod
|
||||
await Load(assembly);
|
||||
continue;
|
||||
}
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
case ".cs":
|
||||
{
|
||||
var code = await File.ReadAllTextAsync(fileInfo.FullName);
|
||||
@@ -352,7 +352,7 @@ namespace BITKit.Mod
|
||||
|
||||
|
||||
//Thread.Sleep(1000);
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
await UniTask.Delay(1000);
|
||||
#else
|
||||
await Task.Delay(1000);
|
||||
@@ -465,7 +465,7 @@ namespace BITKit.Mod
|
||||
await Load(assembly, fileInfo.DirectoryName);
|
||||
break;
|
||||
}
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
case ".cs":
|
||||
{
|
||||
var code = await File.ReadAllTextAsync(fileInfo.FullName);
|
||||
|
@@ -17,7 +17,7 @@ namespace BITKit
|
||||
}
|
||||
public interface ISelectable
|
||||
{
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
UnityEngine.Transform Transform { get; }
|
||||
#endif
|
||||
void SetSelectionState(SelectionState state);
|
||||
|
@@ -11,7 +11,7 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using BITKit.Mod;
|
||||
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using System.Collections;
|
||||
using BITKit.UX;
|
||||
using UnityEngine;
|
||||
@@ -26,7 +26,7 @@ namespace BITKit
|
||||
{
|
||||
public class BITSharp
|
||||
{
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[RuntimeInitializeOnLoadMethod]
|
||||
private static void Reload()
|
||||
{
|
||||
@@ -60,7 +60,7 @@ namespace BITKit
|
||||
assemblies ??= AppDomain.CurrentDomain.GetAssemblies();
|
||||
return assemblies.Select(assembly => assembly.GetType(fullName, false)).FirstOrDefault(type => type is not null);
|
||||
}
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
|
||||
public static Assembly Compile(params string[] codes)
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
@@ -34,7 +34,7 @@ namespace BITKit.IO
|
||||
{
|
||||
private const string DefaultPath = nameof(ApplicationFile)+"."+nameof(DefaultPath);
|
||||
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[UnityEngine.RuntimeInitializeOnLoadMethod]
|
||||
private static void Reload()
|
||||
{
|
||||
@@ -66,7 +66,7 @@ namespace BITKit.IO
|
||||
get
|
||||
{
|
||||
var bp = new BrowserProperties();
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
if (PlayerPrefs.HasKey(DefaultPath))
|
||||
{
|
||||
bp.initialDir = PlayerPrefs.GetString(DefaultPath);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using UnityEngine;
|
||||
#endif
|
||||
namespace BITKit
|
||||
@@ -8,7 +8,7 @@ namespace BITKit
|
||||
{
|
||||
public ConstantHash(object value)
|
||||
{
|
||||
#if UNITY_64
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
HashCode = Animator.StringToHash(value.ToString());
|
||||
#else
|
||||
HashCode = value.GetHashCode();
|
||||
|
Reference in New Issue
Block a user