Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity update for beatsaber-hook #150

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
6b0b9f5
Things compile, needs xref fixes though
RedBrumbler Dec 11, 2023
f30304b
Fix debug binary path
RedBrumbler Dec 11, 2023
ff320e9
remove accidental include
RedBrumbler Dec 11, 2023
b5a3f82
Add concept usage to the main places they should be at
RedBrumbler Dec 11, 2023
fde5c78
Codegen and ListWrapper rename
RedBrumbler Dec 12, 2023
f4c44a2
Fix ref types
RedBrumbler Dec 12, 2023
cddac07
Fix xrefs and usage of methods
RedBrumbler Dec 12, 2023
9435414
Change name of test built binary and add it as a dependency to the ma…
RedBrumbler Dec 12, 2023
bf26757
Fix member access for cordl
RedBrumbler Dec 14, 2023
23d9823
Fix ListW for codegen
RedBrumbler Dec 14, 2023
325740d
Fix ListW for codegen
RedBrumbler Dec 14, 2023
e83526a
Add safety to Basic Event callback
RedBrumbler Dec 14, 2023
db1987b
Fix unboxing logic & fix concept for il2cpp conversion
RedBrumbler Dec 15, 2023
804c0de
Implement klass get ters for EnumPtr and VTPtr
RedBrumbler Dec 15, 2023
d621fcb
Undo include order shenanigans for Il2CppObject/System.Object
RedBrumbler Dec 16, 2023
12a6c29
Add global metadata checks
RedBrumbler Dec 18, 2023
da36515
Fix vtable lookup class init
RedBrumbler Dec 19, 2023
c65bc63
Fix safe ptr GC interactions
RedBrumbler Dec 19, 2023
71833bd
Fix ExtractValue
RedBrumbler Dec 19, 2023
a563691
Explicitly specify value extraction
RedBrumbler Dec 19, 2023
351982b
Add util for il2cpp aware threads
RedBrumbler Dec 21, 2023
7f8c281
Fix il2cpp thread util to be more or less equivalent to std::thread, …
RedBrumbler Dec 21, 2023
d3eabaf
Tweaks to thread util
RedBrumbler Dec 21, 2023
a5e0f21
Add catch logic to il2cpp aware thread
RedBrumbler Dec 21, 2023
cbb910c
Implement nested type lookups in GetClassFromName
RedBrumbler Dec 21, 2023
b9257f5
Fix ResolveVtableSlot
RedBrumbler Dec 22, 2023
7c1f604
If we are resolving a slot on an interface, read into the methods array
RedBrumbler Dec 22, 2023
8da2b3a
Remove codegen usages
Fernthedev Dec 22, 2023
1a6bdd9
Move inline hook to shared
Fernthedev Dec 22, 2023
007a7c7
Fix codegen usage in il2cpp utils
Fernthedev Dec 22, 2023
f7116c8
Remove codegen usage in List
Fernthedev Dec 22, 2023
d1ad285
Allow StringW to cast to another pointer type
Fernthedev Dec 22, 2023
d8f400f
Bring functions to header for template
Fernthedev Dec 22, 2023
91a5c63
Add simple base types for enums and value types
RedBrumbler Dec 23, 2023
3b6e429
Merge pull request #4 from Fernthedev/dev/improve-compile-time
RedBrumbler Dec 23, 2023
244cbd5
ArrayW default ctor as constepxr
RedBrumbler Dec 23, 2023
15de5fb
Tweaks for cordl & codegen wrappers
RedBrumbler Dec 27, 2023
761e3dc
Fix type getting for byrefs of ptrs
RedBrumbler Dec 28, 2023
1f51a1b
Fixup resolves on types with abstract methods
RedBrumbler Jan 2, 2024
adb2359
Fix method generic resolve (#6)
Fernthedev Jan 15, 2024
979b3d4
Initial UnityW implementation (#8)
Fernthedev Jan 19, 2024
b27f40f
constexpr, noexcept some methods, Fix some const, Fix alive check
RedBrumbler Jan 19, 2024
44405ce
Dev/array wrapper (#9)
RedBrumbler Jan 19, 2024
030e001
Add common List methods as C++ counterparts (#5)
Fernthedev Jan 19, 2024
9b9dc34
Dev/thread jni attach (#10)
RedBrumbler Jan 19, 2024
541df42
Improve method overhead (#7)
Fernthedev Jan 19, 2024
796a59a
Initial work for refactor
Fernthedev Jan 19, 2024
f68d583
current changes going smooth but with issues. No more heavy copying
Fernthedev Jan 19, 2024
5adad85
Fix compile time errors related to const
Fernthedev Jan 19, 2024
0f443a2
Fix compile errors
Fernthedev Jan 19, 2024
d57ed63
Experimental method resolution.
Fernthedev Jan 19, 2024
ddf52f5
Add perfect match check
Fernthedev Jan 20, 2024
16cdb2d
Find instead of sort
Fernthedev Jan 20, 2024
018e81c
Use optional bool* for outputting perfect match
Fernthedev Jan 20, 2024
8704e3c
Add string lookup overloads
Fernthedev Jan 20, 2024
a5f0d4e
add some docs
Fernthedev Jan 20, 2024
841e04b
Call method directly
Fernthedev Jan 20, 2024
75fa97e
Add requires clauses to avoid ambiguity
Fernthedev Jan 20, 2024
79e4486
Move UnityW to cordl runtime
Fernthedev Jan 20, 2024
297913b
Improve method resolution and document extensively
Fernthedev Jan 20, 2024
a243a5f
use shared lock to avoid latency costs
Fernthedev Jan 20, 2024
b5085ea
Revert rapidjson update
Fernthedev Jan 20, 2024
420fabf
Add return type check
Fernthedev Jan 20, 2024
e2a307c
Use const for generic methods
Fernthedev Jan 21, 2024
f1005b1
Initial method rewrite idea. We now consolidate invokers and have fun…
Fernthedev Jan 21, 2024
b210603
Log exception on RunMethodOpt
Fernthedev Jan 21, 2024
6c8f9d1
Fix RunGenericMethod
Fernthedev Jan 21, 2024
e75c08e
Fix compile errors and make `void` return use std::monostate
Fernthedev Jan 21, 2024
236b48a
Use MethodResult<TOut>
Fernthedev Jan 21, 2024
0fe43bc
Use Result<T, E> for smaller footprint
Fernthedev Jan 21, 2024
53eba9f
Remove clangd auto import and cleanup
Fernthedev Jan 21, 2024
ae0b631
Fix default return if method info is null
Fernthedev Jan 21, 2024
1f5c1dd
Log ambigious methods
Fernthedev Jan 21, 2024
157e94f
Avoid unnecessary move
Fernthedev Jan 21, 2024
2741d59
Fix error message
Fernthedev Jan 22, 2024
45fde58
Cache make generic method methodInfo
Fernthedev Jan 22, 2024
7cebb76
Add more utility methods to Result<T, E>
Fernthedev Jan 22, 2024
8042164
Initialize if needed
Fernthedev Jan 22, 2024
050ca85
Fix VAR substitution in FindMethod
Fernthedev Jan 22, 2024
f16eed2
Add weight to interfaces
Fernthedev Jan 22, 2024
f16e13a
Take interfaces into account for weight
Fernthedev Jan 22, 2024
da0b0b2
Improve method resolution performance and search for parents properly
Fernthedev Jan 22, 2024
92673cf
reduce weight for interfaces
Fernthedev Jan 22, 2024
4225b17
Merge pull request #11 from Fernthedev/feat/refactor-methods-breaking
RedBrumbler Jan 22, 2024
38e152d
Fix SetWriteBarrier call
RedBrumbler Jan 23, 2024
62bce34
Fix workflows
RedBrumbler Jan 23, 2024
1d3061e
Update version getting
RedBrumbler Jan 23, 2024
b3bd485
Fix ndkpath output
RedBrumbler Jan 23, 2024
e560980
Fix publish to reuse release
RedBrumbler Jan 23, 2024
4b24d26
Fix publish to reuse release
RedBrumbler Jan 23, 2024
62e8f6f
Fix publish uploading debug asset
RedBrumbler Jan 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-ndk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: debug_${{ steps.libname.outputs.NAME }}
path: ./build/debug_${{ steps.libname.outputs.NAME }}
path: ./build/debug/${{ steps.libname.outputs.NAME }}
if-no-files-found: error

# TODO: Add auto-populating releases, auto update versions, auto publish package on release
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ jobs:
tag_name: ${{ github.event.inputs.version }}
files: |
./build/${{ steps.libname.outputs.NAME }}
./build/debug_${{ steps.libname.outputs.NAME }}
./build/debug/${{ steps.libname.outputs.NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
136 changes: 89 additions & 47 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED 20)
# LTO
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)

# define that stores the actual source directory
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
Expand All @@ -22,65 +23,106 @@ add_compile_definitions(VERSION=\"${MOD_VERSION}\")
add_compile_definitions(MOD_ID=\"${MOD_ID}\")
add_compile_definitions(VERSION_NUMBER=300150000)
add_compile_definitions(UNITY_2019)
add_compile_definitions(UNITY_2021)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if (DEFINED TEST_BUILD)
MESSAGE(STATUS "Compiling with test defines")
add_compile_definitions(TEST_CALLBACKS)
add_compile_definitions(TEST_SAFEPTR)
add_compile_definitions(TEST_BYREF)
add_compile_definitions(TEST_ARRAY)
add_compile_definitions(TEST_LIST)
add_compile_definitions(TEST_STRING)
add_compile_definitions(TEST_HOOK)
endif()

add_library(
${COMPILE_ID}
SHARED
function(setup_target target add_test)
message(STATUS "Setting up target ${target}")

add_library(
${target}
SHARED
)

if (add_test)
target_compile_definitions(
${target}
PRIVATE

TEST_CALLBACKS
TEST_SAFEPTR
TEST_BYREF
TEST_ARRAY
TEST_LIST
TEST_STRING
TEST_HOOK
)
endif()

# recursively get all src files
RECURSE_FILES(cpp_file_list_utils ${SOURCE_DIR}/utils/*.cpp)
RECURSE_FILES(c_file_list_utils ${SOURCE_DIR}/utils/*.c)
target_sources(${target} PRIVATE ${cpp_file_list_utils})
target_sources(${target} PRIVATE ${c_file_list_utils})

RECURSE_FILES(cpp_file_list_config ${SOURCE_DIR}/config/*.cpp)
RECURSE_FILES(c_file_list_config ${SOURCE_DIR}/config/*.c)
target_sources(${target} PRIVATE ${cpp_file_list_config})
target_sources(${target} PRIVATE ${c_file_list_config})

if (add_test)
message(STATUS "Adding tests source files to target ${target}")
RECURSE_FILES(cpp_file_list_tests ${SOURCE_DIR}/tests/*.cpp)
RECURSE_FILES(c_file_list_tests ${SOURCE_DIR}/tests/*.c)
target_sources(${target} PRIVATE ${cpp_file_list_tests})
target_sources(${target} PRIVATE ${c_file_list_tests})
endif()

# add root dir as include dir
target_include_directories(${target} PRIVATE ${CMAKE_SOURCE_DIR})
# add src dir as include dir
target_include_directories(${target} PRIVATE ${SOURCE_DIR})
# add include dir as include dir
target_include_directories(${target} PRIVATE ${INCLUDE_DIR})
# add shared dir as include dir
target_include_directories(${target} PUBLIC ${SHARED_DIR})

target_link_directories(${target} PRIVATE ${EXTERN_DIR}/libs)
target_link_libraries(${target} PRIVATE -llog)
target_link_options(${target} PRIVATE "-fuse-ld=ld")

file(GLOB_RECURSE so_libs ${EXTERN_DIR}/libs/*.so)
file(GLOB_RECURSE a_libs ${EXTERN_DIR}/libs/*.a)

target_link_libraries(
${target}
PRIVATE
${so_libs}
${a_libs}
)

target_include_directories(${target} PRIVATE ${EXTERN_DIR}/includes)
target_include_directories(${target} SYSTEM PRIVATE ${EXTERN_DIR}/includes/libil2cpp/il2cpp/libil2cpp)
endfunction()

# compile test as one project
setup_target(test-${COMPILE_ID} YES)
# regular bs hook
setup_target(${COMPILE_ID} NO)

add_dependencies(${COMPILE_ID} test-${COMPILE_ID})

target_compile_definitions(
${COMPILE_ID}
PRIVATE
NO_TEST
)

# recursively get all src files
RECURSE_FILES(cpp_file_list_utils ${SOURCE_DIR}/utils/*.cpp)
RECURSE_FILES(c_file_list_utils ${SOURCE_DIR}/utils/*.c)
target_sources(${COMPILE_ID} PRIVATE ${cpp_file_list_utils})
target_sources(${COMPILE_ID} PRIVATE ${c_file_list_utils})

RECURSE_FILES(cpp_file_list_config ${SOURCE_DIR}/config/*.cpp)
RECURSE_FILES(c_file_list_config ${SOURCE_DIR}/config/*.c)
target_sources(${COMPILE_ID} PRIVATE ${cpp_file_list_config})
target_sources(${COMPILE_ID} PRIVATE ${c_file_list_config})

if (DEFINED TEST_BUILD)
RECURSE_FILES(cpp_file_list_tests ${SOURCE_DIR}/tests/*.cpp)
RECURSE_FILES(c_file_list_tests ${SOURCE_DIR}/tests/*.c)
target_sources(${COMPILE_ID} PRIVATE ${cpp_file_list_tests})
target_sources(${COMPILE_ID} PRIVATE ${c_file_list_tests})
endif()

# add root dir as include dir
target_include_directories(${COMPILE_ID} PRIVATE ${CMAKE_SOURCE_DIR})
# add src dir as include dir
target_include_directories(${COMPILE_ID} PRIVATE ${SOURCE_DIR})
# add include dir as include dir
target_include_directories(${COMPILE_ID} PRIVATE ${INCLUDE_DIR})
# add shared dir as include dir
target_include_directories(${COMPILE_ID} PUBLIC ${SHARED_DIR})

target_link_libraries(${COMPILE_ID} PRIVATE -llog)
target_link_options(${COMPILE_ID} PRIVATE "-fuse-ld=ld")

# add extern stuff like libs and other includes
include(extern.cmake)
# make bs hook build depend on the build of bs hook tests
# add_dependencies(${COMPILE_ID} ${COMPILE_ID}-test)

add_custom_command(TARGET ${COMPILE_ID} POST_BUILD
COMMAND ${CMAKE_STRIP} -g -S -d --strip-all
"lib${COMPILE_ID}.so" -o "stripped_lib${COMPILE_ID}.so"
COMMENT "Strip debug symbols done on final binary.")

add_custom_command(TARGET ${COMPILE_ID} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E rename lib${COMPILE_ID}.so debug_lib${COMPILE_ID}.so
COMMAND ${CMAKE_COMMAND} -E make_directory debug
COMMENT "Create the debug dir"
)
add_custom_command(TARGET ${COMPILE_ID} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E rename lib${COMPILE_ID}.so debug/lib${COMPILE_ID}.so
COMMENT "Rename the lib to debug_ since it has debug symbols"
)

Expand Down
24 changes: 7 additions & 17 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
param (
[Parameter(Mandatory=$false)]
[Switch] $clean
)

function Clean-Build-Folder {
if (Test-Path -Path "build")
Expand All @@ -9,28 +13,14 @@ function Clean-Build-Folder {
}
}

$NDKPath = Get-Content $PSScriptRoot/ndkpath.txt

Clean-Build-Folder

& cmake -G "Ninja" -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DTEST_BUILD=1 . -B build
& cmake --build ./build

$ExitCode = $LastExitCode

if (-not ($ExitCode -eq 0)) {
$msg = "ExitCode: " + $ExitCode
Write-Output $msg
exit $ExitCode
if ($clean.IsPresent) {
Clean-Build-Folder
}

# clean folder
Clean-Build-Folder
# build mod

& cmake -G "Ninja" -DCMAKE_BUILD_TYPE="RelWithDebInfo" . -B build
& cmake --build ./build

$ExitCode = $LastExitCode

exit $ExitCode
exit $ExitCode
2 changes: 1 addition & 1 deletion qpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
{
"id": "libil2cpp",
"versionRange": ">=0.1.2, <0.3.0",
"versionRange": "^0.3.0",
"additionalData": {}
},
{
Expand Down
6 changes: 3 additions & 3 deletions qpm.shared.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
{
"id": "libil2cpp",
"versionRange": ">=0.1.2, <0.3.0",
"versionRange": "^0.3.0",
"additionalData": {}
},
{
Expand All @@ -44,12 +44,12 @@
{
"dependency": {
"id": "libil2cpp",
"versionRange": "=0.2.3",
"versionRange": "=0.3.1",
"additionalData": {
"headersOnly": true
}
},
"version": "0.2.3"
"version": "0.3.1"
},
{
"dependency": {
Expand Down
12 changes: 2 additions & 10 deletions shared/utils/base-wrapper-type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
#include <concepts>
#include <cstdint>
#include "il2cpp-type-check.hpp"

namespace il2cpp_utils {
template<class T>
/// @brief A concept depicting if a type is a wrapper type.
// TODO: Make this use a static creation method instead of a constructor
concept has_il2cpp_conversion = requires (T t) {
{t.convert()} -> std::same_as<void*>;
std::is_constructible_v<T, void*>;
};
}
#include "type-concepts.hpp"

namespace bs_hook {
/// @brief Represents the most basic wrapper type.
Expand All @@ -28,6 +19,7 @@ namespace bs_hook {
return const_cast<void*>(instance);
}

Il2CppObject* operator ->() const noexcept { return const_cast<Il2CppObject*>(static_cast<Il2CppObject const*>(instance)); }
operator Il2CppObject*() const noexcept { return const_cast<Il2CppObject*>(static_cast<Il2CppObject const*>(instance)); }

protected:
Expand Down
4 changes: 3 additions & 1 deletion shared/utils/byref.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include "il2cpp-type-check.hpp"
#include "type-concepts.hpp"

/// @brief Represents a byref parameter.
/// This is REQUIRED for codegen invokes, as RunMethodThrow can't tell the difference between a reference parameter and a byref on constexpr time.
Expand Down Expand Up @@ -33,6 +34,7 @@ struct ByRef {
}
static_assert(sizeof(T*) == sizeof(void*));
};
MARK_GEN_REF_T(ByRef);

// Type specializations for byref specifics
// We do not need il2cpp_no_arg_class specialization for ByRef, since it will never get to that point.
Expand All @@ -56,4 +58,4 @@ struct ::il2cpp_utils::il2cpp_type_check::il2cpp_arg_type<ByRef<T>> {
};

// Creates a ByRef type to wrap a reference
#define byref(...) (ByRef(__VA_ARGS__))
#define byref(...) (ByRef(__VA_ARGS__))
35 changes: 35 additions & 0 deletions shared/utils/enum-wrapper-type.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#pragma once

#include "value-wrapper-type.hpp"

namespace bs_hook {
// 0 special case, but otherwise the size should be an actual amount of bytes it could be
template<std::size_t sz>
requires(sz == 0x0 || sz == 0x1 || sz == 0x2 || sz == 0x4 || sz == 0x8)
struct EnumTypeWrapper : public ValueTypeWrapper<sz> {
static constexpr auto VALUE_TYPE_SIZE = ValueTypeWrapper<sz>::VALUE_TYPE_SIZE;
using ValueTypeWrapper<sz>::ValueTypeWrapper;

constexpr EnumTypeWrapper() = default;
~EnumTypeWrapper() = default;

constexpr EnumTypeWrapper(EnumTypeWrapper&&) = default;
constexpr EnumTypeWrapper(EnumTypeWrapper const&) = default;

constexpr EnumTypeWrapper& operator=(EnumTypeWrapper&&) = default;
constexpr EnumTypeWrapper& operator=(EnumTypeWrapper const&) = default;
};

/// @brief struct to pass a pointer to an enum into a method
struct EnumPtr : public VTPtr {
template<std::size_t sz>
EnumPtr(EnumTypeWrapper<sz>& e) : VTPtr(e) {};

explicit EnumPtr(void* i) : VTPtr(i) {};
};
}

template<std::size_t sz>
struct ::il2cpp_utils::ValueTypeTrait<::bs_hook::EnumTypeWrapper<sz>> {
constexpr static bool value = true;
};
8 changes: 4 additions & 4 deletions shared/utils/hooking.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ struct Hook_##name_ { \
using funcType = retval (*)(__VA_ARGS__); \
static_assert(std::is_same_v<funcType, ::Hooking::InternalMethodCheck<decltype(mPtr)>::funcType>, "Hook method signature does not match!"); \
constexpr static const char* name() { return #name_; } \
static const MethodInfo* getInfo() { return ::il2cpp_utils::il2cpp_type_check::MetadataGetter<mPtr>::get(); } \
static const MethodInfo* getInfo() { return ::il2cpp_utils::il2cpp_type_check::MetadataGetter<mPtr>::methodInfo(); } \
static funcType* trampoline() { return &name_; } \
static inline retval (*name_)(__VA_ARGS__) = nullptr; \
static funcType hook() { return &::Hooking::HookCatchWrapper<&hook_##name_, funcType>::wrapper; } \
Expand All @@ -469,7 +469,7 @@ struct Hook_##name_ { \
using funcType = retval (*)(__VA_ARGS__); \
static_assert(std::is_same_v<funcType, ::Hooking::InternalMethodCheck<decltype(mPtr)>::funcType>, "Hook method signature does not match!"); \
constexpr static const char* name() { return #name_; } \
static const MethodInfo* getInfo() { return ::il2cpp_utils::il2cpp_type_check::MetadataGetter<mPtr>::get(); } \
static const MethodInfo* getInfo() { return ::il2cpp_utils::il2cpp_type_check::MetadataGetter<mPtr>::methodInfo(); } \
static funcType* trampoline() { return &name_; } \
static inline retval (*name_)(__VA_ARGS__) = nullptr; \
static funcType hook() { return hook_##name_; } \
Expand Down Expand Up @@ -542,7 +542,7 @@ struct Hook_##name_ { \
using funcType = decltype(&::Hooking::HookWrapperCompose<&hook_##name_>::wrapper); \
/* static_assert(std::is_same_v<funcType, ::Hooking::InternalMethodCheck<decltype(mPtr)>::funcType>, "Hook method signature does not match!"); */ \
constexpr static const char* name() { return #name_; } \
static const MethodInfo* getInfo() { return ::il2cpp_utils::il2cpp_type_check::MetadataGetter<mPtr>::get(); } \
static const MethodInfo* getInfo() { return ::il2cpp_utils::il2cpp_type_check::MetadataGetter<mPtr>::methodInfo(); } \
static funcType* trampoline() { return &orig_base; } \
static inline funcType orig_base = nullptr; \
template<class... TArgs> \
Expand Down Expand Up @@ -691,4 +691,4 @@ void InstallHookDirect(L& logger, void* dst) {

// TODO: Not yet implemented
#define UNINSTALL_HOOK_DIRECT(logger, name, addr) void
}
}
Loading
Loading