code optimization &new helper functions added / modified

- UnityCore namespace changed to UnityEngine
- Object class is no longer a template. FindObjectOfType function set to template
- Added LogComponents function. It helps us retrieve components from the target gameObject.
- Added GetObjectName function to Object structure (same method is available in utils header)
- Added ConvertToSystemString function.
Converts const char to system.string (app::String)
This commit is contained in:
Jadis0x
2024-06-06 20:43:35 +03:00
parent 5ba4784657
commit 0b84c20f4a
14 changed files with 198 additions and 256 deletions

View File

@@ -2,7 +2,7 @@
#include <iostream>
#include "ClientHelper.h"
#include "UnityCore.h"
#include "UnityEngine.h"
#include "players/players.h"
#include "helpers.h"
#include "esp.hpp"
@@ -31,11 +31,11 @@ static void DrawBoxESP(app::GameObject *it, float footOffset, float headOffset,
if (!it || cam == nullptr)
return;
app::Transform* _transform = Unity::Transform::Get(it);
app::Transform* _transform = UnityEngine::Transform::Get(it);
if (_transform == nullptr)
return;
app::Vector3 pos = Unity::Transform::Position(_transform);
app::Vector3 pos = UnityEngine::Transform::Position(_transform);
app::Vector3 footpos = app::Camera_WorldToScreenPoint_1(cam, app::Vector3{pos.x, pos.y + footOffset, pos.z}, NULL);
app::Vector3 headpos = app::Camera_WorldToScreenPoint_1(cam, app::Vector3{pos.x, pos.y + headOffset, pos.z}, NULL);