Skip to content

Commit

Permalink
fix(lods): prevent empty mesh names
Browse files Browse the repository at this point in the history
  • Loading branch information
Whinarn committed Mar 26, 2021
1 parent 0d19af4 commit ec6cf87
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Runtime/LODGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,9 @@ internal static string GetFinalSaveAssetsPath(string gameObjectName, string rend

private static void SaveLODMeshAsset(Object asset, string gameObjectName, string rendererName, int levelIndex, string meshName, string saveAssetsPath)
{
if (string.IsNullOrEmpty(meshName))
meshName = "unnamed";

gameObjectName = IOUtils.MakeSafeFileName(gameObjectName);
rendererName = IOUtils.MakeSafeFileName(rendererName);
meshName = IOUtils.MakeSafeFileName(meshName);
Expand Down

0 comments on commit ec6cf87

Please sign in to comment.