Add rename option to volumes

This commit is contained in:
Noah Pilarski 2022-09-05 23:35:24 -04:00
parent 5057463172
commit 331d33ac77
6 changed files with 30 additions and 0 deletions

View File

@ -42,6 +42,11 @@ namespace NewHorizons.Builder.ShipLog
revealTriggerVolume.SetActive(false);
revealTriggerVolume.transform.parent = sector?.transform ?? planetGO.transform;
if (!string.IsNullOrEmpty(info.rename))
{
revealTriggerVolume.name = info.rename;
}
if (!string.IsNullOrEmpty(info.parentPath))
{
var newParent = planetGO.transform.Find(info.parentPath);

View File

@ -20,6 +20,11 @@ namespace NewHorizons.Builder.Volumes
go.transform.parent = sector?.transform ?? planetGO.transform;
if (!string.IsNullOrEmpty(info.rename))
{
go.name = info.rename;
}
if (!string.IsNullOrEmpty(info.parentPath))
{
var newParent = planetGO.transform.Find(info.parentPath);

View File

@ -18,6 +18,11 @@ namespace NewHorizons.Builder.Volumes
go.transform.parent = sector?.transform ?? planetGO.transform;
if (!string.IsNullOrEmpty(info.rename))
{
go.name = info.rename;
}
if (!string.IsNullOrEmpty(info.parentPath))
{
var newParent = planetGO.transform.Find(info.parentPath);

View File

@ -22,6 +22,11 @@ namespace NewHorizons.Builder.Volumes
go.transform.parent = sector?.transform ?? planetGO.transform;
if (!string.IsNullOrEmpty(info.rename))
{
go.name = info.rename;
}
if (!string.IsNullOrEmpty(info.parentPath))
{
var newParent = planetGO.transform.Find(info.parentPath);

View File

@ -14,6 +14,11 @@ namespace NewHorizons.Builder.Volumes
go.transform.parent = sector?.transform ?? planetGO.transform;
if (!string.IsNullOrEmpty(info.rename))
{
go.name = info.rename;
}
if (!string.IsNullOrEmpty(info.parentPath))
{
var newParent = planetGO.transform.Find(info.parentPath);

View File

@ -71,6 +71,11 @@ namespace NewHorizons.External.Modules
/// The relative path from the planet to the parent of this object. Optional (will default to the root sector).
/// </summary>
public string parentPath;
/// <summary>
/// An optional rename of this volume.
/// </summary>
public string rename;
}
[JsonObject]