Class LoaderUtils
Assembly: RedLoader.dll
Syntax
public static class LoaderUtils
Properties
CurrentDomain
Declaration
public static MelonPlatformDomainAttribute.CompatibleDomains CurrentDomain { get; }
Property Value
CurrentGameAttribute
Declaration
public static MelonGameAttribute CurrentGameAttribute { get; }
Property Value
Declaration
public static MelonPlatformAttribute.CompatiblePlatforms CurrentPlatform { get; }
Property Value
GameDeveloper
Declaration
[Obsolete("RedLoader.MelonUtils.GameDeveloper is obsolete. Please use RedLoader.InternalUtils.UnityInformationHandler.GameDeveloper instead.")]
public static string GameDeveloper { get; }
Property Value
GameName
Declaration
[Obsolete("RedLoader.MelonUtils.GameName is obsolete. Please use RedLoader.InternalUtils.UnityInformationHandler.GameName instead.")]
public static string GameName { get; }
Property Value
GameVersion
Declaration
[Obsolete("RedLoader.MelonUtils.GameVersion is obsolete. Please use RedLoader.InternalUtils.UnityInformationHandler.GameVersion instead.")]
public static string GameVersion { get; }
Property Value
Declaration
public static PlatformID GetPlatform { get; }
Property Value
HashCode
Declaration
public static string HashCode { get; }
Property Value
IsMac
Declaration
public static bool IsMac { get; }
Property Value
IsUnix
Declaration
public static bool IsUnix { get; }
Property Value
IsWindows
Declaration
public static bool IsWindows { get; }
Property Value
Methods
Clamp<T>(T, T, T)
Declaration
public static T Clamp<T>(T value, T min, T max) where T : IComparable<T>
Parameters
Type |
Name |
Description |
T |
value |
|
T |
min |
|
T |
max |
|
Returns
Type Parameters
ColorFromString(string)
Declaration
public static Color ColorFromString(string color)
Parameters
Type |
Name |
Description |
string |
color |
|
Returns
ComputeSimpleSHA256Hash(string)
Declaration
public static string ComputeSimpleSHA256Hash(string filePath)
Parameters
Type |
Name |
Description |
string |
filePath |
|
Returns
ContainsExtension(string)
Declaration
public static bool ContainsExtension(this string path)
Parameters
Type |
Name |
Description |
string |
path |
|
Returns
GetDelegate(IntPtr, Type)
Declaration
public static Delegate GetDelegate(this IntPtr ptr, Type type)
Parameters
Returns
GetDelegate<T>(IntPtr)
Declaration
public static T GetDelegate<T>(this IntPtr ptr) where T : Delegate
Parameters
Type |
Name |
Description |
IntPtr |
ptr |
|
Returns
Type Parameters
GetDelegate<T>(IntPtr, out T)
Declaration
public static void GetDelegate<T>(this IntPtr ptr, out T output) where T : Delegate
Parameters
Type |
Name |
Description |
IntPtr |
ptr |
|
T |
output |
|
Type Parameters
GetFileProductName(string)
Declaration
public static string GetFileProductName(string filepath)
Parameters
Type |
Name |
Description |
string |
filepath |
|
Returns
GetFunctionPointer(Delegate)
Declaration
public static IntPtr GetFunctionPointer(this Delegate del)
Parameters
Returns
GetMelonFromStackTrace()
Declaration
public static ModBase GetMelonFromStackTrace()
Returns
GetMelonFromStackTrace(StackTrace, bool)
Declaration
public static ModBase GetMelonFromStackTrace(StackTrace st, bool allFrames = false)
Parameters
Returns
GetNativeLibraryExport(IntPtr, string)
Declaration
public static IntPtr GetNativeLibraryExport(this IntPtr ptr, string name)
Parameters
Returns
GetUnityVersion()
Declaration
[Obsolete("RedLoader.MelonUtils.GetUnityVersion() is obsolete. Please use RedLoader.InternalUtils.UnityInformationHandler.EngineVersion instead.")]
public static string GetUnityVersion()
Returns
GetValidTypes(Assembly)
Declaration
public static IEnumerable<Type> GetValidTypes(this Assembly asm)
Parameters
Returns
GetValidTypes(Assembly, LemonFunc<Type, bool>)
Declaration
public static IEnumerable<Type> GetValidTypes(this Assembly asm, LemonFunc<Type, bool> predicate)
Parameters
Returns
IsGame32Bit()
Declaration
public static bool IsGame32Bit()
Returns
IsGameIl2Cpp()
Declaration
public static bool IsGameIl2Cpp()
Returns
IsNotImplemented(MethodBase)
Declaration
public static bool IsNotImplemented(this MethodBase methodBase)
Parameters
Returns
IsOldMono()
Declaration
public static bool IsOldMono()
Returns
IsTypeEqualToFullName(Type, string)
Declaration
public static bool IsTypeEqualToFullName(Type type1, string type2)
Parameters
Returns
IsTypeEqualToName(Type, string)
Declaration
public static bool IsTypeEqualToName(Type type1, string type2)
Parameters
Returns
IsUnderWineOrSteamProton()
Declaration
public static bool IsUnderWineOrSteamProton()
Returns
Declaration
public static ClassPackageFile LoadIncludedClassPackage(this AssetsManager assetsManager)
Parameters
Type |
Name |
Description |
AssetsManager |
assetsManager |
|
Returns
Type |
Description |
ClassPackageFile |
|
MakePlural(string, int)
Declaration
public static string MakePlural(this string str, int amount)
Parameters
Returns
NativeHookAttach(IntPtr, IntPtr)
Declaration
[Obsolete("Use NativeUtils.NativeHook instead")]
public static void NativeHookAttach(IntPtr target, IntPtr detour)
Parameters
NativeHookDetach(IntPtr, IntPtr)
Declaration
[Obsolete("Use NativeUtils.NativeHook instead")]
public static void NativeHookDetach(IntPtr target, IntPtr detour)
Parameters
ParseJSONStringtoStruct<T>(string)
Declaration
public static T ParseJSONStringtoStruct<T>(string jsonstr)
Parameters
Type |
Name |
Description |
string |
jsonstr |
|
Returns
Type Parameters
PullAttributeFromAssembly<T>(Assembly, bool)
Declaration
public static T PullAttributeFromAssembly<T>(Assembly asm, bool inherit = false) where T : Attribute
Parameters
Returns
Type Parameters
PullAttributesFromAssembly<T>(Assembly, bool)
Declaration
public static T[] PullAttributesFromAssembly<T>(Assembly asm, bool inherit = false) where T : Attribute
Parameters
Returns
Type Parameters
RandomDouble()
Declaration
public static double RandomDouble()
Returns
RandomInt()
Declaration
public static int RandomInt()
Returns
RandomInt(int)
Declaration
public static int RandomInt(int max)
Parameters
Type |
Name |
Description |
int |
max |
|
Returns
RandomInt(int, int)
Declaration
public static int RandomInt(int min, int max)
Parameters
Type |
Name |
Description |
int |
min |
|
int |
max |
|
Returns
RandomString(int)
Declaration
public static string RandomString(int length)
Parameters
Type |
Name |
Description |
int |
length |
|
Returns
SetApplicationBase(AppDomainSetup, string)
Declaration
public static void SetApplicationBase(this AppDomainSetup _this, string value)
Parameters
SetConsoleTitle(string)
Declaration
public static void SetConsoleTitle(string title)
Parameters
Type |
Name |
Description |
string |
title |
|
SetCurrentDomainBaseDirectory(string, AppDomain)
Declaration
public static void SetCurrentDomainBaseDirectory(string dirpath, AppDomain domain = null)
Parameters
SetHashSizeValue(HashAlgorithm, int)
Declaration
public static void SetHashSizeValue(this HashAlgorithm _this, int value)
Parameters
ToNewDynamicMethodDefinition(MethodBase)
Declaration
public static DynamicMethodDefinition ToNewDynamicMethodDefinition(this MethodBase methodBase)
Parameters
Returns
Type |
Description |
DynamicMethodDefinition |
|
ToNewHarmonyMethod(MethodInfo)
Declaration
public static HarmonyMethod ToNewHarmonyMethod(this MethodInfo methodInfo)
Parameters
Returns
Type |
Description |
HarmonyMethod |
|
ToNewNativeLibrary(IntPtr)
Declaration
public static NativeLibrary ToNewNativeLibrary(this IntPtr ptr)
Parameters
Type |
Name |
Description |
IntPtr |
ptr |
|
Returns
ToNewNativeLibrary<T>(IntPtr)
Declaration
public static NativeLibrary<T> ToNewNativeLibrary<T>(this IntPtr ptr)
Parameters
Type |
Name |
Description |
IntPtr |
ptr |
|
Returns
Type Parameters