Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
v0.1.2 -- searches for a "Start" node are now case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
yangrobertw committed Jul 30, 2017
1 parent b2c1ba5 commit e7c22c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
Builds/
Library/
Temp/
*.userprefs
4 changes: 2 additions & 2 deletions Assets/Yarn Weaver/scenes/yarnWeaverScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1826,8 +1826,8 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 2124390279}
m_HandleRect: {fileID: 2124390278}
m_Direction: 2
m_Value: 0.9999999
m_Size: 0.24333334
m_Value: 1
m_Size: 0.24333335
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
Expand Down
2 changes: 1 addition & 1 deletion Assets/Yarn Weaver/scripts/YarnWeaverMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ IEnumerator OutputRoutine(string url) {
string GetStartNode () {
// search for a node that starts with "Start" or with the filename
string filename = Path.GetFileNameWithoutExtension( currentFilePath );
var startSearch = dialogueRunner.dialogue.allNodes.Where( x => x.StartsWith("Start") || x.StartsWith(filename) ).ToArray();
var startSearch = dialogueRunner.dialogue.allNodes.Where( x => x.ToLower().StartsWith("start") || x.ToLower().StartsWith(filename.ToLower()) ).ToArray();
if (startSearch != null && startSearch.Length > 0) {
return startSearch[0];
} else { // otherwise, just go for the first node we find
Expand Down

0 comments on commit e7c22c3

Please sign in to comment.