Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimjio committed Sep 20, 2022
1 parent fe2f1b1 commit b80ca15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace
void an_text_set_material_to_textmesh_hook(Il2CppObject* _this)
{
reinterpret_cast<decltype(an_text_set_material_to_textmesh_hook)*>(an_text_set_material_to_textmesh_orig)(_this);
if (!assets || !g_replace_to_custom_font) return;
if (!(assets && g_replace_to_custom_font)) return;

FieldInfo* mainField = il2cpp_class_get_field_from_name(_this->klass, "_mainTextMesh");
FieldInfo* mainRenderer = il2cpp_class_get_field_from_name(_this->klass, "_mainTextMeshRenderer");
Expand Down Expand Up @@ -1231,7 +1231,7 @@ namespace
auto load_scene_internal_addr = il2cpp_resolve_icall("UnityEngine.SceneManagement.SceneManager::LoadSceneAsyncNameIndexInternal_Injected(System.String,System.Int32,UnityEngine.SceneManagement.LoadSceneParameters&,System.bool)");
#pragma endregion
#pragma region LOAD_ASSETBUNDLE
if (!assets)
if (!assets && !g_font_assetbundle_path.empty() && g_replace_to_custom_font)
{
auto assetbundlePath = local::u8_wide(g_font_assetbundle_path);
if (PathIsRelativeW(assetbundlePath.data()))
Expand Down

0 comments on commit b80ca15

Please sign in to comment.