diff --git a/Editor/OutlineNormalImporter.cs b/Editor/OutlineNormalImporter.cs index ba1bdb2..933aa19 100644 --- a/Editor/OutlineNormalImporter.cs +++ b/Editor/OutlineNormalImporter.cs @@ -42,6 +42,9 @@ internal static List GetSharedMeshesFromGameObject(GameObject go) { List meshes = new (); + if (go == null) + return meshes; + foreach (var meshFilter in go.GetComponentsInChildren()) { meshes.Add(meshFilter.sharedMesh); diff --git a/Editor/SampleCustomBaker.cs b/Editor/SampleCustomBaker.cs index 4c01e03..6474683 100644 --- a/Editor/SampleCustomBaker.cs +++ b/Editor/SampleCustomBaker.cs @@ -1,4 +1,4 @@ -// Copyright (c) Jason Ma +// Copyright (c) Jason Ma // // Copy and modify this file to customize where outline normals are stored. diff --git a/Editor/SampleCustomImportRule.cs b/Editor/SampleCustomImportRule.cs index 1549e1f..c6240f1 100644 --- a/Editor/SampleCustomImportRule.cs +++ b/Editor/SampleCustomImportRule.cs @@ -1,4 +1,4 @@ -// Copyright (c) Jason Ma +// Copyright (c) Jason Ma // // Copy and modify this file to customize which models should bake outline normals. diff --git a/package.json b/package.json index be6d0df..6bd44c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.jasonma.outlinenormalsmoother", - "version": "1.0.0", + "version": "1.0.1", "displayName": "Outline Normal Smoother", "description": "A unity plugin that automatically calculates smooth normals for outline.", "keywords": [