various header files added/updated

- Created a header file called players. added a helper function to get the gameobject of all players, the gameobject of the local player and the NolanBehaviour component
- Added UnityCore file to make it easier for us to use unity functions
- Misc file fully updated
- Added Wrapper class to make it easier to use il2cpp functions
- ClientHelper updated
- color.hpp library was included in the project to make the console colorful
This commit is contained in:
Jadis0x
2024-05-16 21:37:01 +03:00
parent 17df650819
commit f69767f794
13 changed files with 1593 additions and 292 deletions

18
lib/UnityCore.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include "pch-il2cpp.h"
#include "UnityCore.h"
app::Component* Unity::GameObject::GetComponentByName(app::GameObject* go, const char* type)
{
app::String* str = reinterpret_cast<app::String*>(il2cpp_string_new(type));
if (str != nullptr) {
app::Component* component = app::GameObject_GetComponentByName(go, str, nullptr);
if (component != nullptr) {
return component;
}
}
return nullptr;
}