Files
DevourClient/lib/private/UnityEngine/GameObject.cpp
Jadis0x 0b90598356 Reorganized UnityEngine namespace
Reorganized UnityEngine namespace by splitting headers into individual classes
2024-06-07 19:07:09 +03:00

30 lines
799 B
C++

#include "pch-il2cpp.h"
#include "UnityEngine/GameObject.h"
#include "wrapper.h"
#include <helpers.h>
app::Component* GameObject::GetComponentByName(app::GameObject* go, const char* type)
{
app::Component* component = app::GameObject_GetComponentByName(go, ConvertToSystemString(type), nullptr);
return component ? component : nullptr;
}
app::Component__Array* GameObject::LogComponents(app::GameObject* go)
{
Wrapper obj("UnityEngine.CoreModule.dll");
Il2CppObject* object = obj.find_class("UnityEngine", "Component").get_class();
if (!object) return nullptr;
app::Type* type = reinterpret_cast<app::Type*>(object);
if (!type) return nullptr;
app::Component__Array* __components = app::GameObject_GetComponents(go, type, nullptr);
return __components ? __components : nullptr;
}