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

How to call a Generic Functions #62

Open
lyxgitgo opened this issue Nov 14, 2024 · 1 comment
Open

How to call a Generic Functions #62

lyxgitgo opened this issue Nov 14, 2024 · 1 comment

Comments

@lyxgitgo
Copy link

What is the game you are using with IL2CPP Resolver?

Details:

Unity.Entities.EntityManager
public readonly bool HasComponent(Entity entity)
Using IL2CPP::Class::Utils::GetMethodPointer(), I can't get the Pointer, and how to pass the param T

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

@NoKlyf24
Copy link

NoKlyf24 commented Dec 14, 2024

Sorry for very late response.
This is the code if you're trying to get the HasComponent function offset

Unity::il2cppClass* EntityManagerClass = IL2CPP::Class::Find("UnityEngine.Entities.EntityManager"); // Replace UnityEngine with Unity if it doesn't work

if (EntityManagerClass)
    uintptr_t HasComponentOffset = IL2CPP::Class::Utils::GetMethodPointer(EntityManagerClass, "HasComponent");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants