- 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
19 lines
408 B
C++
19 lines
408 B
C++
#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;
|
|
}
|