mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Massive Optimization + Added Summoner
This commit is contained in:
1 parent
66a0e02242
commit
317db05689
238 files changed
+2333
-1581
No files matched your search
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using Il2CppInterop.Runtime;
|
||||
using Il2CppInterop.Runtime.InteropTypes;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -13,7 +12,7 @@ public static class ObjectHelper
|
||||
{
|
||||
if (obj == null) return;
|
||||
|
||||
obj.ForEachChild((Il2CppSystem.Action<GameObject>)(x => DestroyTranslator(x)));
|
||||
obj.ForEachChild((Il2CppSystem.Action<GameObject>)(x => x.DestroyTranslator()));
|
||||
TextTranslatorTMP[] translator = obj.GetComponentsInChildren<TextTranslatorTMP>(true);
|
||||
translator?.Do(Object.Destroy);
|
||||
}
|
||||
@@ -52,11 +51,7 @@ public static class Il2CppCastHelper
|
||||
public static T CastFast<T>(this Il2CppObjectBase obj) where T : Il2CppObjectBase
|
||||
{
|
||||
if (obj is T casted) return casted;
|
||||
#if ANDROID
|
||||
return obj.Cast<T>();
|
||||
#else
|
||||
return obj.Pointer.CastFast<T>();
|
||||
#endif
|
||||
return OperatingSystem.IsAndroid() ? obj.Cast<T>() : obj.Pointer.CastFast<T>();
|
||||
}
|
||||
|
||||
private static T CastFast<T>(this IntPtr ptr) where T : Il2CppObjectBase
|
||||
|
||||
Reference in new issue
Block a user