Skip to content

Commit

Permalink
Find nodes without characterData
Browse files Browse the repository at this point in the history
  • Loading branch information
BDeshiDev committed Jun 7, 2024
1 parent fb6d491 commit f145248
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
EditorGUI.EndDisabledGroup();
}
}
else
{
position.y += EditorGUIUtility.singleLineHeight;
EditorGUI.HelpBox(position, "NO CharacterData", MessageType.Error);
}

// Set indent back to what it was
EditorGUI.indentLevel = indent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

namespace Studio23.SS2.DialogueSystem.Data
{
[CreateAssetMenu(menuName = "Studio-23/Dialogue System/New Dialogue Graph", fileName ="Dialogue Graph")]
[CreateAssetMenu(menuName = "Studio-23/Dialogue System/New Dial" +
"ogue Graph", fileName ="Dialogue Graph")]
public class DialogueGraph : NodeGraph
{
public bool SkippableDialogue;
Expand Down Expand Up @@ -144,5 +145,24 @@ private DialogueStartNode FindStartNode()
return null;
}

[ContextMenu("FindNodesWithoutCharacterData")]
public void FindNodesWithoutCharacterData()
{
foreach (var node in nodes)
{
if (node is DialogueLineNodeBase lineNode)
{
if (lineNode.SpeakerData?.Character == null)
{
Debug.LogWarning($"{lineNode} has no characterData", lineNode);
}
else
{

}
}
}
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand Down Expand Up @@ -142,8 +143,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand Down Expand Up @@ -210,8 +212,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand Down Expand Up @@ -347,8 +350,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand Down Expand Up @@ -413,8 +417,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand Down Expand Up @@ -481,8 +486,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand All @@ -507,6 +513,7 @@ MonoBehaviour:
ports:
keys:
- Exit
- Events
values:
- _fieldName: Exit
_node: {fileID: -1822135301059774123}
Expand All @@ -520,7 +527,17 @@ MonoBehaviour:
_connectionType: 1
_typeConstraint: 2
_dynamic: 0
- _fieldName: Events
_node: {fileID: -1822135301059774123}
_typeQualifiedName: Studio23.SS2.DialogueSystem.Data.EventNodeBase, com.studio23.ss2.dialoguesystem,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
connections: []
_direction: 1
_connectionType: 0
_typeConstraint: 3
_dynamic: 0
Exit: {fileID: 0}
Events: {fileID: 0}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -637,8 +654,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand Down Expand Up @@ -730,6 +748,7 @@ MonoBehaviour:
ports:
keys:
- Exit
- Events
values:
- _fieldName: Exit
_node: {fileID: 4547693736577939076}
Expand All @@ -743,7 +762,17 @@ MonoBehaviour:
_connectionType: 1
_typeConstraint: 2
_dynamic: 0
- _fieldName: Events
_node: {fileID: 4547693736577939076}
_typeQualifiedName: Studio23.SS2.DialogueSystem.Data.EventNodeBase, com.studio23.ss2.dialoguesystem,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
connections: []
_direction: 1
_connectionType: 0
_typeConstraint: 3
_dynamic: 0
Exit: {fileID: 0}
Events: {fileID: 0}
--- !u!114 &5124243875242287576
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -803,8 +832,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand Down Expand Up @@ -877,8 +907,9 @@ MonoBehaviour:
m_FallbackState: 0
m_WaitForCompletion: 0
m_LocalVariables: []
ID:
Reaction:
SpeakerData:
Character: {fileID: 0}
Expression: {fileID: 0}
FMODEvent:
Exit: {fileID: 0}
Events: {fileID: 0}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.studio23.ss2.dialoguesystem",
"version": "0.4.12",
"version": "0.4.13",
"displayName": "Dialogue System",
"description": "Dialogue system is an authoring tool for developers to integrate dialogue from scriptwriters inside unity.",
"unity": "2022.3",
Expand Down

0 comments on commit f145248

Please sign in to comment.