mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Search in body instead of doing search utilities
This commit is contained in:
parent
fb9e10fee7
commit
f27bb25f86
@ -35,7 +35,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return (AddToExistingDialogue(info, xml), null);
|
return (AddToExistingDialogue(go, info, xml), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,9 +70,11 @@ namespace NewHorizons.Builder.Props
|
|||||||
return (dialogue, remoteTrigger);
|
return (dialogue, remoteTrigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CharacterDialogueTree AddToExistingDialogue(DialogueInfo info, string xml)
|
private static CharacterDialogueTree AddToExistingDialogue(GameObject go, DialogueInfo info, string xml)
|
||||||
{
|
{
|
||||||
var existingDialogue = SearchUtilities.Find(info.pathToExistingDialogue)?.GetComponent<CharacterDialogueTree>();
|
var dialogueObject = go.FindChild(info.pathToExistingDialogue);
|
||||||
|
if (dialogueObject == null) dialogueObject = SearchUtilities.Find(info.pathToExistingDialogue);
|
||||||
|
var existingDialogue = dialogueObject != null ? dialogueObject.GetComponent<CharacterDialogueTree>() : null;
|
||||||
|
|
||||||
if (existingDialogue == null)
|
if (existingDialogue == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user