Skip to content

Commit

Permalink
Update MapLoader.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
AutumnThyme committed Feb 9, 2025
1 parent 2541ac2 commit 56796f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Assets/Scripts/Map/MapLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,13 @@ private void Batch()
var renderer = filter.GetComponent<Renderer>();
if (renderer == null || renderer.sharedMaterials.Length > 1)
continue;
if (filter?.sharedMesh == null)
{

Debug.LogError($"Could not find MeshFilter or SharedMesh on object {mapObject.ScriptObject.Name}");
continue;
}

string hash = filter.sharedMesh.GetHashCode().ToString();
hash += positionHash;
if (renderer.enabled)
Expand Down

0 comments on commit 56796f0

Please sign in to comment.