mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Check if reticle image exists before instantiating
This commit is contained in:
parent
25bdb7dd82
commit
680cd6db13
@ -19,8 +19,9 @@ namespace NewHorizons.Handlers
|
|||||||
_systems = systems;
|
_systems = systems;
|
||||||
|
|
||||||
var shipLogRoot = SearchUtilities.Find("Ship_Body/Module_Cabin/Systems_Cabin/ShipLogPivot/ShipLog/ShipLogPivot/ShipLogCanvas");
|
var shipLogRoot = SearchUtilities.Find("Ship_Body/Module_Cabin/Systems_Cabin/ShipLogPivot/ShipLog/ShipLogPivot/ShipLogCanvas");
|
||||||
|
var reticleImage = SearchUtilities.Find("Ship_Body/Module_Cabin/Systems_Cabin/ShipLogPivot/ShipLog/ShipLogPivot/ShipLogCanvas/DetectiveMode/ReticleImage (1)/");
|
||||||
|
|
||||||
if (shipLogRoot != null)
|
if (shipLogRoot != null && reticleImage != null)
|
||||||
{
|
{
|
||||||
var starChartLog = new GameObject("StarChartMode");
|
var starChartLog = new GameObject("StarChartMode");
|
||||||
starChartLog.SetActive(false);
|
starChartLog.SetActive(false);
|
||||||
@ -31,7 +32,7 @@ namespace NewHorizons.Handlers
|
|||||||
|
|
||||||
ShipLogStarChartMode = starChartLog.AddComponent<ShipLogStarChartMode>();
|
ShipLogStarChartMode = starChartLog.AddComponent<ShipLogStarChartMode>();
|
||||||
|
|
||||||
var reticleImage = GameObject.Instantiate(SearchUtilities.Find("Ship_Body/Module_Cabin/Systems_Cabin/ShipLogPivot/ShipLog/ShipLogPivot/ShipLogCanvas/DetectiveMode/ReticleImage (1)/"), starChartLog.transform);
|
GameObject.Instantiate(reticleImage, starChartLog.transform);
|
||||||
|
|
||||||
var scaleRoot = new GameObject("ScaleRoot");
|
var scaleRoot = new GameObject("ScaleRoot");
|
||||||
scaleRoot.transform.parent = starChartLog.transform;
|
scaleRoot.transform.parent = starChartLog.transform;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user