Skip to content

Commit

Permalink
Fix null reference
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMa0012 committed Oct 31, 2024
1 parent 57bf44b commit d18d4d2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Editor/OutlineNormalImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ internal static List<Mesh> GetSharedMeshesFromGameObject(GameObject go)
{
List<Mesh> meshes = new ();

if (go == null)
return meshes;

foreach (var meshFilter in go.GetComponentsInChildren<MeshFilter>())
{
meshes.Add(meshFilter.sharedMesh);
Expand Down
2 changes: 1 addition & 1 deletion Editor/SampleCustomBaker.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Jason Ma
// Copyright (c) Jason Ma
//
// Copy and modify this file to customize where outline normals are stored.

Expand Down
2 changes: 1 addition & 1 deletion Editor/SampleCustomImportRule.cs
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down

0 comments on commit d18d4d2

Please sign in to comment.