Skip to content

Commit

Permalink
Check for flags exactly
Browse files Browse the repository at this point in the history
  • Loading branch information
azrogers committed Feb 2, 2024
1 parent aed92f2 commit 2747b8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion native~/Runtime/src/UnityPrepareRendererResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,8 @@ void freePrimitiveGameObject(
UnityEngine::Texture texture = material.GetTexture(textureID);
std::string name = texture == nullptr ? "" : texture.name().ToStlString();
if (texture != nullptr &&
(texture.hideFlags() & UnityEngine::HideFlags::HideAndDontSave)) {
(texture.hideFlags() & UnityEngine::HideFlags::HideAndDontSave) ==
UnityEngine::HideFlags::HideAndDontSave) {
UnityLifetime::Destroy(texture);
}
}
Expand Down

0 comments on commit 2747b8f

Please sign in to comment.