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:
18
lib/UnityCore.cpp
Normal file
18
lib/UnityCore.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user