mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Stop dialogue from breaking entirely if pathToAnimController is invalid
This commit is contained in:
parent
007ff3fa1b
commit
3587424bbb
@ -4,6 +4,9 @@ using OWML.Common;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using UnityEngine;
|
||||
using NewHorizons.Utility;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Builder.Props
|
||||
{
|
||||
public static class DialogueBuilder
|
||||
@ -110,6 +113,12 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
var character = go.transform.Find(info.pathToAnimController);
|
||||
|
||||
if (character == null)
|
||||
{
|
||||
Logger.LogError($"Couldn't find child of {go.transform.GetPath()} at {info.pathToAnimController}");
|
||||
return;
|
||||
}
|
||||
|
||||
// At most one of these should ever not be null
|
||||
var nomaiController = character.GetComponent<SolanumAnimController>();
|
||||
var controller = character.GetComponent<CharacterAnimController>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user