mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Readd copies of arc prefabs
There are still "dumb" copies of the cairns, computers and etc. So these really don't need to be removed.
This commit is contained in:
parent
a2ed79341a
commit
8bd04d4afc
@ -45,25 +45,31 @@ namespace NewHorizons.Builder.Props
|
||||
private static void InitPrefabs()
|
||||
{
|
||||
// Just take every scroll and get the first arc
|
||||
var arcs = GameObject.FindObjectsOfType<ScrollItem>().Select(x => x?._nomaiWallText?.gameObject?.transform?.Find("Arc 1")?.gameObject).Where(x => x != null).ToArray();
|
||||
var existingArcs = GameObject.FindObjectsOfType<ScrollItem>().Select(x => x?._nomaiWallText?.gameObject?.transform?.Find("Arc 1")?.gameObject).Where(x => x != null).ToArray();
|
||||
_arcPrefabs = new List<GameObject>();
|
||||
_childArcPrefabs = new List<GameObject>();
|
||||
foreach (var arc in arcs)
|
||||
foreach (var existingArc in existingArcs)
|
||||
{
|
||||
if (arc.GetComponent<MeshRenderer>().material.name.Contains("Child"))
|
||||
if (existingArc.GetComponent<MeshRenderer>().material.name.Contains("Child"))
|
||||
{
|
||||
var arc = existingArc.InstantiateInactive();
|
||||
arc.name = "Arc (Child)";
|
||||
_childArcPrefabs.Add(arc);
|
||||
}
|
||||
else
|
||||
{
|
||||
var arc = existingArc.InstantiateInactive();
|
||||
arc.name = "Arc";
|
||||
_arcPrefabs.Add(arc);
|
||||
}
|
||||
}
|
||||
|
||||
var ghostArcs = GameObject.FindObjectsOfType<GhostWallText>().Select(x => x?._textLine?.gameObject).Where(x => x != null).ToArray();
|
||||
var existingGhostArcs = GameObject.FindObjectsOfType<GhostWallText>().Select(x => x?._textLine?.gameObject).Where(x => x != null).ToArray();
|
||||
_ghostArcPrefabs = new List<GameObject>();
|
||||
foreach (var arc in ghostArcs)
|
||||
foreach (var existingArc in existingGhostArcs)
|
||||
{
|
||||
var arc = existingArc.InstantiateInactive();
|
||||
arc.name = "Arc (Ghost)";
|
||||
_ghostArcPrefabs.Add(arc);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user