do null check instead of implicit bool cast for silly consistency

This commit is contained in:
JohnCorby 2023-03-18 15:05:04 -07:00
parent 3c5b3c403d
commit eb21f00957

View File

@ -44,7 +44,7 @@ namespace NewHorizons.Builder.Props
var parentPath = info.parentPath ?? defaultParentPath;
if (planetGO && !string.IsNullOrEmpty(parentPath))
if (planetGO != null && !string.IsNullOrEmpty(parentPath))
{
var newParent = planetGO.transform.Find(parentPath);
if (newParent != null)
@ -69,7 +69,7 @@ namespace NewHorizons.Builder.Props
go.transform.localPosition = pos;
go.transform.localRotation = rot;
}
else if (planetGO)
else if (planetGO != null)
{
go.transform.position = planetGO.transform.TransformPoint(pos);
go.transform.rotation = planetGO.transform.TransformRotation(rot);