Add comments for why we name TextAssets

This commit is contained in:
Nick 2022-07-10 10:58:59 -04:00
parent f95e5774d2
commit 21ace3d11a
2 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,8 @@ namespace NewHorizons.Builder.Props
var xml = File.ReadAllText(mod.Manifest.ModFolderPath + info.xmlFile); var xml = File.ReadAllText(mod.Manifest.ModFolderPath + info.xmlFile);
var text = new TextAsset(xml); var text = new TextAsset(xml);
// Text assets need a name to be used with VoiceMod
text.name = Path.GetFileNameWithoutExtension(info.xmlFile); text.name = Path.GetFileNameWithoutExtension(info.xmlFile);
dialogueTree.SetTextXml(text); dialogueTree.SetTextXml(text);

View File

@ -308,6 +308,8 @@ namespace NewHorizons.Builder.Props
var nomaiWallText = nomaiWallTextObj.AddComponent<NomaiWallText>(); var nomaiWallText = nomaiWallTextObj.AddComponent<NomaiWallText>();
var text = new TextAsset(xmlPath); var text = new TextAsset(xmlPath);
// Text assets need a name to be used with VoiceMod
text.name = Path.GetFileNameWithoutExtension(info.xmlFile); text.name = Path.GetFileNameWithoutExtension(info.xmlFile);
BuildArcs(xmlPath, nomaiWallText, nomaiWallTextObj, info); BuildArcs(xmlPath, nomaiWallText, nomaiWallTextObj, info);