Skip to content

Commit

Permalink
chore: small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Sep 18, 2024
1 parent 93ec09f commit bbdbc66
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Runtime/Core/Scripts/Data/AvatarData.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using UnityEngine;
using UnityEngine;

namespace ReadyPlayerMe.Core
{
Expand All @@ -23,19 +22,19 @@ private void OnDestroy()

foreach (var material in materials)
{
if(material == null) continue;
if (material == null) continue;

foreach (var property in material.GetTexturePropertyNames())
{
Texture texture = material.GetTexture(property);
if(texture == null) continue;
Destroy(texture);

if (texture == null) continue;

Destroy(texture);
}
Destroy(material);
}

Destroy(mesh.sharedMesh);
}
}
Expand Down

0 comments on commit bbdbc66

Please sign in to comment.