Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 16335c1

Browse files
committed
Auto-cleanup
1 parent 8fab9e6 commit 16335c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+195
-200
lines changed

src/Core/Config/ConfigManager.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ public static class ConfigManager
1616
// See the UnityExplorer.Loader namespace for the implementations.
1717
public static ConfigHandler Handler { get; private set; }
1818

19-
public static ConfigElement<KeyCode> Master_Toggle;
19+
public static ConfigElement<KeyCode> Master_Toggle;
2020
public static ConfigElement<UIManager.VerticalAnchor> Main_Navbar_Anchor;
21-
public static ConfigElement<bool> Force_Unlock_Mouse;
22-
public static ConfigElement<KeyCode> Force_Unlock_Toggle;
23-
public static ConfigElement<bool> Aggressive_Mouse_Unlock;
24-
public static ConfigElement<bool> Disable_EventSystem_Override;
25-
public static ConfigElement<string> Default_Output_Path;
26-
public static ConfigElement<bool> Log_Unity_Debug;
27-
public static ConfigElement<bool> Hide_On_Startup;
28-
public static ConfigElement<float> Startup_Delay_Time;
29-
30-
public static ConfigElement<string> Reflection_Signature_Blacklist;
21+
public static ConfigElement<bool> Force_Unlock_Mouse;
22+
public static ConfigElement<KeyCode> Force_Unlock_Toggle;
23+
public static ConfigElement<bool> Aggressive_Mouse_Unlock;
24+
public static ConfigElement<bool> Disable_EventSystem_Override;
25+
public static ConfigElement<string> Default_Output_Path;
26+
public static ConfigElement<bool> Log_Unity_Debug;
27+
public static ConfigElement<bool> Hide_On_Startup;
28+
public static ConfigElement<float> Startup_Delay_Time;
29+
30+
public static ConfigElement<string> Reflection_Signature_Blacklist;
3131

3232
// internal configs
3333
internal static InternalConfigHandler InternalHandler { get; private set; }

src/Core/Input/CursorUnlocker.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using System;
2+
using System.Collections;
23
using UnityEngine;
34
using UnityEngine.EventSystems;
4-
using UnityExplorer.Core.Input;
5-
using BF = System.Reflection.BindingFlags;
6-
using UnityExplorer.Core.Config;
75
using UnityExplorer.Core;
6+
using UnityExplorer.Core.Config;
7+
using UnityExplorer.Core.Input;
88
using UnityExplorer.UI;
9-
using System.Collections;
9+
using BF = System.Reflection.BindingFlags;
1010

1111

1212
namespace UnityExplorer.Core.Input

src/Core/Input/InputManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
2-
using UnityEngine;
32
using System.Diagnostics.CodeAnalysis;
3+
using UnityEngine;
44
using UnityEngine.EventSystems;
55

66
namespace UnityExplorer.Core.Input
@@ -74,7 +74,7 @@ private static void InitHandler()
7474
ExplorerCore.Log("Initialized Legacy Input support");
7575
return;
7676
}
77-
catch
77+
catch
7878
{
7979
// It's not working, we'll fall back to InputSystem.
8080
}

src/Core/Input/InputSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
24
using System.Reflection;
35
using UnityEngine;
46
using UnityEngine.EventSystems;
57
using UnityExplorer.UI;
6-
using System.Collections.Generic;
7-
using System.Linq;
88

99
namespace UnityExplorer.Core.Input
1010
{

src/Core/Reflection/Il2CppReflection.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected override void Initialize()
3737
$"deobfuscated types count: {DeobfuscatedTypes.Count}");
3838
}
3939

40-
#region IL2CPP Extern and pointers
40+
#region IL2CPP Extern and pointers
4141

4242
// Extern C++ methods
4343
[DllImport("GameAssembly", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
@@ -63,10 +63,10 @@ public static bool Il2CppTypeNotNull(Type type, out IntPtr il2cppPtr)
6363
return il2cppPtr != IntPtr.Zero;
6464
}
6565

66-
#endregion
66+
#endregion
6767

6868

69-
#region Deobfuscation cache
69+
#region Deobfuscation cache
7070

7171
private static readonly Dictionary<string, Type> DeobfuscatedTypes = new Dictionary<string, Type>();
7272
private static readonly Dictionary<string, string> reverseDeobCache = new Dictionary<string, string>();
@@ -111,7 +111,7 @@ internal override string Internal_ProcessTypeInString(string theString, Type typ
111111
return theString;
112112
}
113113

114-
#endregion
114+
#endregion
115115

116116

117117
// Get type by name
@@ -124,7 +124,7 @@ internal override Type Internal_GetTypeByName(string fullName)
124124
return base.Internal_GetTypeByName(fullName);
125125
}
126126

127-
#region Get actual type
127+
#region Get actual type
128128

129129
internal override Type Internal_GetActualType(object obj)
130130
{
@@ -183,10 +183,10 @@ public static Type GetUnhollowedType(CppType cppType)
183183
return monoType;
184184
}
185185

186-
#endregion
186+
#endregion
187187

188188

189-
#region Casting
189+
#region Casting
190190

191191
private static readonly Dictionary<string, IntPtr> cppClassPointers = new Dictionary<string, IntPtr>();
192192

@@ -278,10 +278,10 @@ internal override object Internal_TryCast(object obj, Type castTo)
278278
// return il2cpp_class_is_assignable_from(thisTypePtr, fromTypePtr);
279279
//}
280280

281-
#endregion
281+
#endregion
282282

283283

284-
#region Boxing and unboxing ValueTypes
284+
#region Boxing and unboxing ValueTypes
285285

286286
// cached il2cpp unbox methods
287287
internal static readonly Dictionary<string, MethodInfo> unboxMethods = new Dictionary<string, MethodInfo>();
@@ -384,10 +384,10 @@ public object MakeIl2CppPrimitive(Type cppType, object monoValue)
384384
return cppStruct;
385385
}
386386

387-
#endregion
387+
#endregion
388388

389389

390-
#region String boxing/unboxing
390+
#region String boxing/unboxing
391391

392392
private const string IL2CPP_STRING_FULLNAME = "Il2CppSystem.String";
393393
private const string STRING_FULLNAME = "System.String";
@@ -428,10 +428,10 @@ public string UnboxString(object value)
428428
return s;
429429
}
430430

431-
#endregion
431+
#endregion
432432

433433

434-
#region Singleton finder
434+
#region Singleton finder
435435

436436
internal override void Internal_FindSingleton(string[] possibleNames, Type type, BF flags, List<object> instances)
437437
{
@@ -453,10 +453,10 @@ internal override void Internal_FindSingleton(string[] possibleNames, Type type,
453453
base.Internal_FindSingleton(possibleNames, type, flags, instances);
454454
}
455455

456-
#endregion
456+
#endregion
457457

458458

459-
#region Force-loading game modules
459+
#region Force-loading game modules
460460

461461
internal static string UnhollowedFolderPath => Path.GetFullPath(
462462
#if ML
@@ -513,10 +513,10 @@ internal bool DoLoadModule(string fullPath, bool suppressWarning = false)
513513
return false;
514514
}
515515

516-
#endregion
516+
#endregion
517517

518518

519-
#region Il2cpp reflection blacklist
519+
#region Il2cpp reflection blacklist
520520

521521
public override string[] DefaultReflectionBlacklist => defaultIl2CppBlacklist.ToArray();
522522

@@ -665,10 +665,10 @@ internal bool DoLoadModule(string fullPath, bool suppressWarning = false)
665665
"UnityEngine.XR.InputDevice.SendHapticImpulse",
666666
};
667667

668-
#endregion
668+
#endregion
669669

670670

671-
#region IL2CPP IEnumerable and IDictionary
671+
#region IL2CPP IEnumerable and IDictionary
672672

673673
protected override bool Internal_TryGetEntryType(Type enumerableType, out Type type)
674674
{

src/Core/Reflection/ReflectionUtility.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
using System.IO;
55
using System.Linq;
66
using System.Reflection;
7-
using BF = System.Reflection.BindingFlags;
8-
using UnityExplorer.Core.Runtime;
97
using System.Text;
108
using UnityEngine;
119
using UnityExplorer.Core.Config;
10+
using UnityExplorer.Core.Runtime;
11+
using BF = System.Reflection.BindingFlags;
1212

1313
namespace UnityExplorer
1414
{
@@ -225,7 +225,7 @@ public static Type[] GetAllBaseTypes(Type type)
225225
return ret;
226226
}
227227

228-
#endregion
228+
#endregion
229229

230230

231231
#region Type and Generic Parameter implementation cache
@@ -360,7 +360,7 @@ private static HashSet<Type> GetGenericParameterImplementations(string key, Type
360360
return genericParameterInheritance[key];
361361
}
362362

363-
#endregion
363+
#endregion
364364

365365

366366
#region Internal MemberInfo Cache
@@ -493,7 +493,7 @@ public static bool IsBlacklisted(MemberInfo member)
493493

494494

495495
// Temp fix for IL2CPP until interface support improves
496-
496+
497497
// IsEnumerable
498498

499499
public static bool IsEnumerable(Type type) => Instance.Internal_IsEnumerable(type);
@@ -505,7 +505,7 @@ protected virtual bool Internal_IsEnumerable(Type type)
505505

506506
// TryGetEnumerator (list)
507507

508-
public static bool TryGetEnumerator(object list, out IEnumerator enumerator)
508+
public static bool TryGetEnumerator(object list, out IEnumerator enumerator)
509509
=> Instance.Internal_TryGetEnumerator(list, out enumerator);
510510

511511
protected virtual bool Internal_TryGetEnumerator(object list, out IEnumerator enumerator)
@@ -546,7 +546,7 @@ protected virtual bool Internal_TryGetEntryType(Type enumerableType, out Type ty
546546
type = typeof(object);
547547
return false;
548548
}
549-
549+
550550
// IsDictionary
551551

552552
public static bool IsDictionary(Type type) => Instance.Internal_IsDictionary(type);
@@ -558,7 +558,7 @@ protected virtual bool Internal_IsDictionary(Type type)
558558

559559
// TryGetEnumerator (dictionary)
560560

561-
public static bool TryGetDictEnumerator(object dictionary, out IEnumerator<DictionaryEntry> dictEnumerator)
561+
public static bool TryGetDictEnumerator(object dictionary, out IEnumerator<DictionaryEntry> dictEnumerator)
562562
=> Instance.Internal_TryGetDictEnumerator(dictionary, out dictEnumerator);
563563

564564
protected virtual bool Internal_TryGetDictEnumerator(object dictionary, out IEnumerator<DictionaryEntry> dictEnumerator)

src/Core/Runtime/Mono/MonoProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public static void SetChildControlHeight(this HorizontalOrVerticalLayoutGroup gr
143143
{
144144
if (pi_childControlHeight == null)
145145
pi_childControlHeight = group.GetType().GetProperty("childControlHeight");
146-
146+
147147
pi_childControlHeight?.SetValue(group, value, null);
148148
}
149149

src/Core/Tests/TestClass.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
using System.Collections;
33
using System.Collections.Generic;
44
using System.Linq;
5+
using System.Reflection;
56
using System.Text;
67
using UnityEngine;
7-
using UnityExplorer.UI.CacheObject.IValues;
8-
using System.Reflection;
98
using UnityExplorer.UI;
9+
using UnityExplorer.UI.CacheObject.IValues;
1010
#if CPP
1111
using UnhollowerRuntimeLib;
1212
using UnhollowerBaseLib;
@@ -16,7 +16,7 @@ namespace UnityExplorer.Tests
1616
{
1717
public class TestIndexer : IList<int>
1818
{
19-
private readonly List<int> list = new List<int>() { 1,2,3,4,5 };
19+
private readonly List<int> list = new List<int>() { 1, 2, 3, 4, 5 };
2020

2121
public int Count => list.Count;
2222
public bool IsReadOnly => false;
@@ -133,21 +133,21 @@ public static List<object> RandomList
133133
}
134134
}
135135

136-
private static void TestGeneric<T>()
136+
private static void TestGeneric<T>()
137137
{
138138
ExplorerCore.Log("Test1 " + typeof(T).FullName);
139139
}
140-
140+
141141
private static void TestGenericClass<T>() where T : class
142142
{
143143
ExplorerCore.Log("Test2 " + typeof(T).FullName);
144144
}
145-
145+
146146
private static void TestComponent<T>() where T : Component
147147
{
148148
ExplorerCore.Log("Test3 " + typeof(T).FullName);
149149
}
150-
150+
151151
private static void TestStruct<T>() where T : struct
152152
{
153153
ExplorerCore.Log("Test3 " + typeof(T).FullName);

src/Core/Utility/ParseUtility.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static class ParseUtility
2222
public const string NUMBER_FORMAT = "0.####";
2323

2424
private static readonly Dictionary<int, string> numSequenceStrings = new Dictionary<int, string>();
25-
25+
2626
// Helper for formatting float/double/decimal numbers to maximum of 4 decimal points.
2727
public static string FormatDecimalSequence(params object[] numbers)
2828
{
@@ -100,7 +100,7 @@ public static bool TryParse(string input, Type type, out object obj, out Excepti
100100
obj = ReflectionUtility.GetMethodInfo(type, "Parse", ArgumentUtility.ParseArgs)
101101
.Invoke(null, new object[] { input });
102102
}
103-
103+
104104
return true;
105105
}
106106
catch (Exception ex)
@@ -148,7 +148,7 @@ public static string ToStringForInput(object obj, Type type)
148148
}
149149
else
150150
return obj.ToString();
151-
151+
152152
}
153153
catch (Exception ex)
154154
{

0 commit comments

Comments
 (0)