class TMP_Text : public UnityEngine::Component
{
public:
__forceinline auto set_font(TMP_FontAsset* font) -> void
{
MONO_METHOD(fn, E("TMPro::TMP_Text.set_font()"), -1, void(*)(void*, void*));
fn(this, font);
}
}
class UnityEngine::AssetBundle
{
public:
__forceinline static auto load_from_memory(std::uintptr_t data) -> UnityEngine::AssetBundle*
{
MONO_METHOD(load_from_memory_fn, E("UnityEngine::AssetBundle.LoadFromMemory()"), 1, UnityEngine::AssetBundle * (*)(std::uintptr_t));
return load_from_memory_fn(data);
}
__forceinline static auto load_from_file(System::String path) -> UnityEngine::AssetBundle*
{
MONO_METHOD(load_from_memory_fn, E("UnityEngine::AssetBundle.LoadFromFile()"), 3, UnityEngine::AssetBundle * (*)(System::String, std::uint32_t, std::uint64_t));
return load_from_memory_fn(path, 0, 0);
}
template<typename type>
__forceinline auto load_asset(System::String name, std::uintptr_t type_object) -> type
{
MONO_METHOD(load_asset_fn, E("UnityEngine::AssetBundle.LoadAsset_Internal()"), -1, void* (*)(void*, System::String, std::uintptr_t));
return reinterpret_cast<type>(load_asset_fn(this, name, type_object));
}
};
static auto bundle = UnityEngine::AssetBundle::load_from_file(E(L"C:\\assets.ua"));
static auto font_asset = bundle->load_asset<TMPro::TMP_FontAsset>(E(L"Bender Outline SDF"), TMPro::TMP_FontAsset::Type());
//hook içerisinde text_obj->set_font çağırarak font assetinizi pushlayın, eğer çok geç çalışan bir yere hook attıysanız SetAllDirty çağırın.