Showing preview only (524K chars total). Download the full file or copy to clipboard to get everything.
Repository: TeodorVecerdi/DialogueGraph
Branch: main
Commit: 9837f4c05998
Files: 279
Total size: 457.3 KB
Directory structure:
gitextract_spodhmoi/
├── .github/
│ └── FUNDING.yml
├── .gitignore
├── Dependencies/
│ ├── SerializableCallback/
│ │ ├── .gitignore
│ │ ├── Editor/
│ │ │ ├── SerializableCallbackDrawer.cs
│ │ │ ├── SerializableCallbackDrawer.cs.meta
│ │ │ ├── Siccity.SerializableCallback.Editor.asmdef
│ │ │ └── Siccity.SerializableCallback.Editor.asmdef.meta
│ │ ├── Editor.meta
│ │ ├── LICENSE.md
│ │ ├── LICENSE.md.meta
│ │ ├── README.md
│ │ ├── README.md.meta
│ │ ├── Runtime/
│ │ │ ├── Attributes/
│ │ │ │ ├── TargetConstraintAttribute.cs
│ │ │ │ └── TargetConstraintAttribute.cs.meta
│ │ │ ├── Attributes.meta
│ │ │ ├── InvokableCallback.cs
│ │ │ ├── InvokableCallback.cs.meta
│ │ │ ├── InvokableCallbackBase.cs
│ │ │ ├── InvokableCallbackBase.cs.meta
│ │ │ ├── InvokableEvent.cs
│ │ │ ├── InvokableEvent.cs.meta
│ │ │ ├── InvokableEventBase.cs
│ │ │ ├── InvokableEventBase.cs.meta
│ │ │ ├── SerializableCallback.cs
│ │ │ ├── SerializableCallback.cs.meta
│ │ │ ├── SerializableCallbackBase.cs
│ │ │ ├── SerializableCallbackBase.cs.meta
│ │ │ ├── SerializableEvent.cs
│ │ │ ├── SerializableEvent.cs.meta
│ │ │ ├── SerializableEventBase.cs
│ │ │ ├── SerializableEventBase.cs.meta
│ │ │ ├── Siccity.SerializableCallback.asmdef
│ │ │ ├── Siccity.SerializableCallback.asmdef.meta
│ │ │ ├── Test.cs
│ │ │ └── Test.cs.meta
│ │ ├── Runtime.meta
│ │ ├── package.json
│ │ └── package.json.meta
│ ├── SerializableCallback.meta
│ ├── SerializableDictionary/
│ │ ├── Editor/
│ │ │ ├── SerializableDictionary.Editor.asmdef
│ │ │ ├── SerializableDictionary.Editor.asmdef.meta
│ │ │ ├── SerializableDictionaryPropertyDrawer.cs
│ │ │ └── SerializableDictionaryPropertyDrawer.cs.meta
│ │ ├── Editor.meta
│ │ ├── LICENSE.md
│ │ ├── LICENSE.md.meta
│ │ ├── Runtime/
│ │ │ ├── SerializableDictionary.Runtime.asmdef
│ │ │ ├── SerializableDictionary.Runtime.asmdef.meta
│ │ │ ├── SerializableDictionary.cs
│ │ │ └── SerializableDictionary.cs.meta
│ │ └── Runtime.meta
│ └── SerializableDictionary.meta
├── Dependencies.meta
├── Editor/
│ ├── AssetCallbacks/
│ │ ├── CreateDlogGraph.cs
│ │ └── CreateDlogGraph.cs.meta
│ ├── AssetCallbacks.meta
│ ├── DialogueGraph.Editor.asmdef
│ ├── DialogueGraph.Editor.asmdef.meta
│ ├── Extensions/
│ │ ├── DlogExtensions.cs
│ │ ├── DlogExtensions.cs.meta
│ │ ├── GUILayoutHelper.cs
│ │ ├── GUILayoutHelper.cs.meta
│ │ ├── GraphViewExtensions.cs
│ │ ├── GraphViewExtensions.cs.meta
│ │ ├── VisualElementExtensions.cs
│ │ └── VisualElementExtensions.cs.meta
│ ├── Extensions.meta
│ ├── Graph/
│ │ ├── Attributes/
│ │ │ ├── TitleAttribute.cs
│ │ │ └── TitleAttribute.cs.meta
│ │ ├── Attributes.meta
│ │ ├── Data/
│ │ │ ├── CopyPasteData.cs
│ │ │ ├── CopyPasteData.cs.meta
│ │ │ ├── DlogGraphData.cs
│ │ │ ├── DlogGraphData.cs.meta
│ │ │ ├── DlogGraphObject.cs
│ │ │ ├── DlogGraphObject.cs.meta
│ │ │ ├── NodeDrawState.cs
│ │ │ ├── NodeDrawState.cs.meta
│ │ │ ├── Properties/
│ │ │ │ ├── AbstractProperty.cs
│ │ │ │ ├── AbstractProperty.cs.meta
│ │ │ │ ├── ActorProperty.cs
│ │ │ │ ├── ActorProperty.cs.meta
│ │ │ │ ├── CheckProperty.cs
│ │ │ │ ├── CheckProperty.cs.meta
│ │ │ │ ├── TriggerProperty.cs
│ │ │ │ └── TriggerProperty.cs.meta
│ │ │ ├── Properties.meta
│ │ │ ├── SerializedEdge.cs
│ │ │ ├── SerializedEdge.cs.meta
│ │ │ ├── SerializedNode.cs
│ │ │ ├── SerializedNode.cs.meta
│ │ │ ├── SerializedProperty.cs
│ │ │ ├── SerializedProperty.cs.meta
│ │ │ ├── VersionMismatchObject.cs
│ │ │ └── VersionMismatchObject.cs.meta
│ │ ├── Data.meta
│ │ ├── Nodes/
│ │ │ ├── AbstractNode.cs
│ │ │ ├── AbstractNode.cs.meta
│ │ │ ├── Boolean/
│ │ │ │ ├── BinaryBooleanNode.cs
│ │ │ │ ├── BinaryBooleanNode.cs.meta
│ │ │ │ ├── BooleanNodes.cs
│ │ │ │ ├── BooleanNodes.cs.meta
│ │ │ │ ├── UnaryBooleanNode.cs
│ │ │ │ └── UnaryBooleanNode.cs.meta
│ │ │ ├── Boolean.meta
│ │ │ ├── NodeColors.cs
│ │ │ ├── NodeColors.cs.meta
│ │ │ ├── NpcNode.cs
│ │ │ ├── NpcNode.cs.meta
│ │ │ ├── Port/
│ │ │ │ ├── DlogPort.cs
│ │ │ │ ├── DlogPort.cs.meta
│ │ │ │ ├── PortHelper.cs
│ │ │ │ ├── PortHelper.cs.meta
│ │ │ │ ├── PortType.cs
│ │ │ │ └── PortType.cs.meta
│ │ │ ├── Port.meta
│ │ │ ├── PropertyNode.cs
│ │ │ ├── PropertyNode.cs.meta
│ │ │ ├── SelfNode.cs
│ │ │ └── SelfNode.cs.meta
│ │ ├── Nodes.meta
│ │ ├── Views/
│ │ │ ├── Blackboard/
│ │ │ │ ├── BlackboardPropertyView.cs
│ │ │ │ ├── BlackboardPropertyView.cs.meta
│ │ │ │ ├── BlackboardProvider.cs
│ │ │ │ └── BlackboardProvider.cs.meta
│ │ │ ├── Blackboard.meta
│ │ │ ├── DlogEditorWindow.cs
│ │ │ ├── DlogEditorWindow.cs.meta
│ │ │ ├── DlogGraphView.cs
│ │ │ ├── DlogGraphView.cs.meta
│ │ │ ├── DlogWindowEvents.cs
│ │ │ ├── DlogWindowEvents.cs.meta
│ │ │ ├── EdgeConnectorListener.cs
│ │ │ ├── EdgeConnectorListener.cs.meta
│ │ │ ├── EditorView.cs
│ │ │ ├── EditorView.cs.meta
│ │ │ ├── SearchWindow/
│ │ │ │ ├── SearchWindowAdapter.cs
│ │ │ │ ├── SearchWindowAdapter.cs.meta
│ │ │ │ ├── SearchWindowProvider.cs
│ │ │ │ └── SearchWindowProvider.cs.meta
│ │ │ └── SearchWindow.meta
│ │ └── Views.meta
│ ├── Graph.meta
│ ├── Importers/
│ │ ├── DlogGraphAssetPostProcessor.cs
│ │ ├── DlogGraphAssetPostProcessor.cs.meta
│ │ ├── DlogGraphImporter.cs
│ │ ├── DlogGraphImporter.cs.meta
│ │ ├── DlogGraphImporterEditor.cs
│ │ └── DlogGraphImporterEditor.cs.meta
│ ├── Importers.meta
│ ├── Inspector/
│ │ ├── DlogObjectEditor.cs
│ │ └── DlogObjectEditor.cs.meta
│ ├── Inspector.meta
│ ├── Util/
│ │ ├── DialogueGraphUtility.cs
│ │ ├── DialogueGraphUtility.cs.meta
│ │ ├── Ref.cs
│ │ ├── Ref.cs.meta
│ │ ├── ResourcesUtility.cs
│ │ ├── ResourcesUtility.cs.meta
│ │ ├── UIElementsFactory.cs
│ │ ├── UIElementsFactory.cs.meta
│ │ ├── Versioning/
│ │ │ ├── Conversion/
│ │ │ │ ├── ConvertMethodAttribute.cs
│ │ │ │ ├── ConvertMethodAttribute.cs.meta
│ │ │ │ ├── VersionConverter.cs
│ │ │ │ └── VersionConverter.cs.meta
│ │ │ ├── Conversion.meta
│ │ │ ├── SemVer.cs
│ │ │ └── SemVer.cs.meta
│ │ └── Versioning.meta
│ └── Util.meta
├── Editor.meta
├── Github~/
│ ├── CODE_OF_CONDUCT.md
│ └── CONTRIBUTING.md
├── LICENSE.md
├── LICENSE.md.meta
├── README.md
├── README.md.meta
├── Resources/
│ ├── Inspector/
│ │ ├── ActorEditor.uxml
│ │ ├── ActorEditor.uxml.meta
│ │ ├── CheckEditor.uxml
│ │ ├── CheckEditor.uxml.meta
│ │ ├── DlogObjectEditor.uxml
│ │ ├── DlogObjectEditor.uxml.meta
│ │ ├── Styles/
│ │ │ ├── ActorEditor.uss
│ │ │ ├── ActorEditor.uss.meta
│ │ │ ├── CheckEditor.uss
│ │ │ ├── CheckEditor.uss.meta
│ │ │ ├── DlogObjectEditor.uss
│ │ │ ├── DlogObjectEditor.uss.meta
│ │ │ ├── TriggerEditor.uss
│ │ │ └── TriggerEditor.uss.meta
│ │ ├── Styles.meta
│ │ ├── TriggerEditor.uxml
│ │ └── TriggerEditor.uxml.meta
│ ├── Inspector.meta
│ ├── Styles/
│ │ ├── Graph.uss
│ │ ├── Graph.uss.meta
│ │ ├── Node/
│ │ │ ├── BooleanNode.uss
│ │ │ ├── BooleanNode.uss.meta
│ │ │ ├── CombinerNode.uss
│ │ │ ├── CombinerNode.uss.meta
│ │ │ ├── Node.uss
│ │ │ ├── Node.uss.meta
│ │ │ ├── Port.uss
│ │ │ └── Port.uss.meta
│ │ ├── Node.meta
│ │ ├── PropertyView/
│ │ │ ├── Blackboard.uss
│ │ │ ├── Blackboard.uss.meta
│ │ │ ├── ReferenceNameField.uss
│ │ │ └── ReferenceNameField.uss.meta
│ │ └── PropertyView.meta
│ ├── Styles.meta
│ ├── Textures/
│ │ ├── boolean/
│ │ │ ├── AND.png.meta
│ │ │ ├── NAND.png.meta
│ │ │ ├── NOR.png.meta
│ │ │ ├── NOT.png.meta
│ │ │ ├── OR.png.meta
│ │ │ ├── XNOR.png.meta
│ │ │ └── XOR.png.meta
│ │ ├── boolean.meta
│ │ ├── checkCombinerBackgroundAnd.png.meta
│ │ ├── checkCombinerBackgroundOr.png.meta
│ │ ├── dloggraph_256.png.meta
│ │ ├── dloggraph_error_256.psd
│ │ ├── dloggraph_error_256.psd.meta
│ │ └── dloggraph_runtime_256.png.meta
│ └── Textures.meta
├── Resources.meta
├── Runtime/
│ ├── Data/
│ │ ├── ActorData.cs
│ │ ├── ActorData.cs.meta
│ │ ├── BooleanOperation.cs
│ │ ├── BooleanOperation.cs.meta
│ │ ├── CheckTree.cs
│ │ ├── CheckTree.cs.meta
│ │ ├── ConversationLine.cs
│ │ ├── ConversationLine.cs.meta
│ │ ├── DlogObject.cs
│ │ ├── DlogObject.cs.meta
│ │ ├── Edge.cs
│ │ ├── Edge.cs.meta
│ │ ├── Node.cs
│ │ ├── Node.cs.meta
│ │ ├── Properties/
│ │ │ ├── Property.cs
│ │ │ ├── Property.cs.meta
│ │ │ ├── PropertyType.cs
│ │ │ └── PropertyType.cs.meta
│ │ └── Properties.meta
│ ├── Data.meta
│ ├── DialogueGraph.Runtime.asmdef
│ ├── DialogueGraph.Runtime.asmdef.meta
│ ├── DlogObjectData.cs
│ ├── DlogObjectData.cs.meta
│ ├── GenericDataTypes.cs
│ ├── GenericDataTypes.cs.meta
│ ├── RuntimeDialogueGraph.cs
│ └── RuntimeDialogueGraph.cs.meta
├── Runtime.meta
├── Samples~/
│ ├── DemoProject/
│ │ ├── Example.dlog
│ │ ├── Example.dlog.meta
│ │ ├── Prefabs/
│ │ │ ├── Line Entry.prefab
│ │ │ └── Line Entry.prefab.meta
│ │ ├── Prefabs.meta
│ │ ├── Scenes/
│ │ │ ├── Demo.unity
│ │ │ ├── Demo.unity.meta
│ │ │ ├── DemoLightingSettings.lighting
│ │ │ └── DemoLightingSettings.lighting.meta
│ │ ├── Scenes.meta
│ │ ├── Scripts/
│ │ │ ├── LineController.cs
│ │ │ ├── LineController.cs.meta
│ │ │ ├── LineEntry.cs
│ │ │ ├── LineEntry.cs.meta
│ │ │ ├── NPCDialogue.cs
│ │ │ └── NPCDialogue.cs.meta
│ │ ├── Scripts.meta
│ │ ├── Sprites/
│ │ │ └── Square.png.meta
│ │ └── Sprites.meta
│ └── DemoProject.meta
├── package.json
└── package.json.meta
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: teodorvecerdi
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://teodorvecerdi.itch.io/dialogue-graph']
================================================
FILE: .gitignore
================================================
# Created by https://www.toptal.com/developers/gitignore/api/rider,unity
# Edit at https://www.toptal.com/developers/gitignore?templates=rider,unity
### Rider ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Unity ###
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta
# Unity3D generated file on crash reports
sysinfo.txt
# Builds
*.apk
*.unitypackage
# Crashlytics generated file
# Autogenerated files
InitTestScene*.unity.meta
InitTestScene*.unity
# End of https://www.toptal.com/developers/gitignore/api/rider,unity
# Symlink to force 'Samples~' to show up in unity
Samples/
Samples.meta
Samples
================================================
FILE: Dependencies/SerializableCallback/.gitignore
================================================
================================================
FILE: Dependencies/SerializableCallback/Editor/SerializableCallbackDrawer.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
[CustomPropertyDrawer(typeof(TargetConstraintAttribute))]
[CustomPropertyDrawer(typeof(SerializableCallbackBase), true)]
public class SerializableCallbackDrawer : PropertyDrawer {
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
// Indent label
label.text = " " + label.text;
#if UNITY_2019_1_OR_NEWER
GUI.Box(position, "");
#else
GUI.Box(position, "", (GUIStyle)
"flow overlay box");
#endif
position.y += 4;
// Using BeginProperty / EndProperty on the parent property means that
// prefab override logic works on the entire property.
property.serializedObject.Update();
EditorGUI.BeginProperty(position, label, property);
// Draw label
Rect pos = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
Rect targetRect = new Rect(pos.x, pos.y, pos.width, EditorGUIUtility.singleLineHeight);
// Get target
SerializedProperty targetProp = property.FindPropertyRelative("_target");
object target = targetProp.objectReferenceValue;
if (attribute != null && attribute is TargetConstraintAttribute) {
Type targetType = (attribute as TargetConstraintAttribute).targetType;
EditorGUI.ObjectField(targetRect, targetProp, targetType, GUIContent.none);
} else EditorGUI.PropertyField(targetRect, targetProp, GUIContent.none);
if (target == null) {
Rect helpBoxRect = new Rect(position.x + 8, targetRect.max.y + EditorGUIUtility.standardVerticalSpacing, position.width - 16, EditorGUIUtility.singleLineHeight);
string msg = "Call not set. Execution will be slower.";
EditorGUI.HelpBox(helpBoxRect, msg, MessageType.Warning);
} else if (target is MonoScript) {
Rect helpBoxRect = new Rect(position.x + 8, targetRect.max.y + EditorGUIUtility.standardVerticalSpacing, position.width - 16, EditorGUIUtility.singleLineHeight + EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
string msg = "Assign a GameObject, Component or a ScriptableObject, not a script.";
EditorGUI.HelpBox(helpBoxRect, msg, MessageType.Warning);
} else {
int indent = EditorGUI.indentLevel;
EditorGUI.indentLevel++;
// Get method name
SerializedProperty methodProp = property.FindPropertyRelative("_methodName");
string methodName = methodProp.stringValue;
// Get args
SerializedProperty argProps = property.FindPropertyRelative("_args");
Type[] argTypes = GetArgTypes(argProps);
// Get dynamic
SerializedProperty dynamicProp = property.FindPropertyRelative("_dynamic");
bool dynamic = dynamicProp.boolValue;
// Get active method
MethodInfo activeMethod = GetMethod(target, methodName, argTypes);
GUIContent methodlabel = new GUIContent("n/a");
if (activeMethod != null) methodlabel = new GUIContent(PrettifyMethod(activeMethod));
else if (!string.IsNullOrEmpty(methodName)) methodlabel = new GUIContent("Missing (" + PrettifyMethod(methodName, argTypes) + ")");
Rect methodRect = new Rect(position.x, targetRect.max.y + EditorGUIUtility.standardVerticalSpacing, position.width, EditorGUIUtility.singleLineHeight);
// Method select button
pos = EditorGUI.PrefixLabel(methodRect, GUIUtility.GetControlID(FocusType.Passive), new GUIContent(dynamic ? "Method (dynamic)" : "Method"));
if (EditorGUI.DropdownButton(pos, methodlabel, FocusType.Keyboard)) {
MethodSelector(property);
}
if (activeMethod != null && !dynamic) {
// Args
ParameterInfo[] activeParameters = activeMethod.GetParameters();
Rect argRect = new Rect(position.x, methodRect.max.y + EditorGUIUtility.standardVerticalSpacing, position.width, EditorGUIUtility.singleLineHeight);
string[] types = new string[argProps.arraySize];
for (int i = 0; i < types.Length; i++) {
SerializedProperty argProp = argProps.FindPropertyRelative("Array.data[" + i + "]");
GUIContent argLabel = new GUIContent(ObjectNames.NicifyVariableName(activeParameters[i].Name));
EditorGUI.BeginChangeCheck();
switch ((Arg.ArgType) argProp.FindPropertyRelative("argType").enumValueIndex) {
case Arg.ArgType.Bool:
EditorGUI.PropertyField(argRect, argProp.FindPropertyRelative("boolValue"), argLabel);
break;
case Arg.ArgType.Int:
EditorGUI.PropertyField(argRect, argProp.FindPropertyRelative("intValue"), argLabel);
break;
case Arg.ArgType.Float:
EditorGUI.PropertyField(argRect, argProp.FindPropertyRelative("floatValue"), argLabel);
break;
case Arg.ArgType.String:
EditorGUI.PropertyField(argRect, argProp.FindPropertyRelative("stringValue"), argLabel);
break;
case Arg.ArgType.Object:
SerializedProperty typeProp = argProp.FindPropertyRelative("_typeName");
SerializedProperty objProp = argProp.FindPropertyRelative("objectValue");
if (typeProp != null) {
Type objType = Type.GetType(typeProp.stringValue, false);
EditorGUI.BeginChangeCheck();
Object obj = objProp.objectReferenceValue;
obj = EditorGUI.ObjectField(argRect, argLabel, obj, objType, true);
if (EditorGUI.EndChangeCheck()) {
objProp.objectReferenceValue = obj;
}
} else {
EditorGUI.PropertyField(argRect, objProp, argLabel);
}
break;
}
if (EditorGUI.EndChangeCheck()) {
property.FindPropertyRelative("dirty").boolValue = true;
}
argRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
}
}
EditorGUI.indentLevel = indent;
}
// Set indent back to what it was
EditorGUI.EndProperty();
property.serializedObject.ApplyModifiedProperties();
}
private class MenuItem {
public GenericMenu.MenuFunction action;
public string path;
public GUIContent label;
public MenuItem(string path, string name, GenericMenu.MenuFunction action) {
this.action = action;
this.label = new GUIContent(path + '/' + name);
this.path = path;
}
}
void MethodSelector(SerializedProperty property) {
// Return type constraint
Type returnType = null;
// Arg type constraint
Type[] argTypes = new Type[0];
// Get return type and argument constraints
SerializableCallbackBase dummy = GetDummyFunction(property);
Type[] genericTypes = dummy.GetType().BaseType.GetGenericArguments();
// SerializableEventBase is always void return type
if (dummy is SerializableEventBase) {
returnType = typeof(void);
if (genericTypes.Length > 0) {
argTypes = new Type[genericTypes.Length];
Array.Copy(genericTypes, argTypes, genericTypes.Length);
}
} else {
if (genericTypes != null && genericTypes.Length > 0) {
// The last generic argument is the return type
returnType = genericTypes[genericTypes.Length - 1];
if (genericTypes.Length > 1) {
argTypes = new Type[genericTypes.Length - 1];
Array.Copy(genericTypes, argTypes, genericTypes.Length - 1);
}
}
}
SerializedProperty targetProp = property.FindPropertyRelative("_target");
List<MenuItem> dynamicItems = new List<MenuItem>();
List<MenuItem> staticItems = new List<MenuItem>();
List<Object> targets = new List<Object>() { targetProp.objectReferenceValue };
if (targets[0] is Component) {
targets = (targets[0] as Component).gameObject.GetComponents<Component>().ToList<Object>();
targets.Add((targetProp.objectReferenceValue as Component).gameObject);
} else if (targets[0] is GameObject) {
targets = (targets[0] as GameObject).GetComponents<Component>().ToList<Object>();
targets.Add(targetProp.objectReferenceValue as GameObject);
}
for (int c = 0; c < targets.Count; c++) {
Object t = targets[c];
MethodInfo[] methods = targets[c].GetType().GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
for (int i = 0; i < methods.Length; i++) {
MethodInfo method = methods[i];
// Skip methods with wrong return type
if (returnType != null && method.ReturnType != returnType) continue;
// Skip methods with null return type
// if (method.ReturnType == typeof(void)) continue;
// Skip generic methods
if (method.IsGenericMethod) continue;
Type[] parms = method.GetParameters().Select(x => x.ParameterType).ToArray();
// Skip methods with more than 4 args
if (parms.Length > 4) continue;
// Skip methods with unsupported args
if (parms.Any(x => !Arg.IsSupported(x))) continue;
string methodPrettyName = PrettifyMethod(methods[i]);
staticItems.Add(new MenuItem(targets[c].GetType().Name + "/" + methods[i].DeclaringType.Name, methodPrettyName, () => SetMethod(property, t, method, false)));
// Skip methods with wrong constrained args
if (argTypes.Length == 0 || !Enumerable.SequenceEqual(argTypes, parms)) continue;
dynamicItems.Add(new MenuItem(targets[c].GetType().Name + "/" + methods[i].DeclaringType.Name, methods[i].Name, () => SetMethod(property, t, method, true)));
}
}
// Construct and display context menu
GenericMenu menu = new GenericMenu();
if (dynamicItems.Count > 0) {
string[] paths = dynamicItems.GroupBy(x => x.path).Select(x => x.First().path).ToArray();
foreach (string path in paths) {
menu.AddItem(new GUIContent(path + "/Dynamic " + PrettifyTypes(argTypes)), false, null);
}
for (int i = 0; i < dynamicItems.Count; i++) {
menu.AddItem(dynamicItems[i].label, false, dynamicItems[i].action);
}
foreach (string path in paths) {
menu.AddItem(new GUIContent(path + "/ "), false, null);
menu.AddItem(new GUIContent(path + "/Static parameters"), false, null);
}
}
for (int i = 0; i < staticItems.Count; i++) {
menu.AddItem(staticItems[i].label, false, staticItems[i].action);
}
if (menu.GetItemCount() == 0) menu.AddDisabledItem(new GUIContent("No methods with return type '" + GetTypeName(returnType) + "'"));
menu.ShowAsContext();
}
string PrettifyMethod(string methodName, Type[] parmTypes) {
string parmnames = PrettifyTypes(parmTypes);
return methodName + "(" + parmnames + ")";
}
string PrettifyMethod(MethodInfo methodInfo) {
if (methodInfo == null) throw new ArgumentNullException("methodInfo");
ParameterInfo[] parms = methodInfo.GetParameters();
string parmnames = PrettifyTypes(parms.Select(x => x.ParameterType).ToArray());
return GetTypeName(methodInfo.ReturnParameter.ParameterType) + " " + methodInfo.Name + "(" + parmnames + ")";
}
string PrettifyTypes(Type[] types) {
if (types == null) throw new ArgumentNullException("types");
return string.Join(", ", types.Select(x => GetTypeName(x)).ToArray());
}
MethodInfo GetMethod(object target, string methodName, Type[] types) {
MethodInfo activeMethod = target.GetType().GetMethod(methodName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static, null, CallingConventions.Any, types, null);
return activeMethod;
}
private Type[] GetArgTypes(SerializedProperty argsProp) {
Type[] types = new Type[argsProp.arraySize];
for (int i = 0; i < argsProp.arraySize; i++) {
SerializedProperty argProp = argsProp.GetArrayElementAtIndex(i);
SerializedProperty typeNameProp = argProp.FindPropertyRelative("_typeName");
if (typeNameProp != null) types[i] = Type.GetType(typeNameProp.stringValue, false);
if (types[i] == null) types[i] = Arg.RealType((Arg.ArgType) argProp.FindPropertyRelative("argType").enumValueIndex);
}
return types;
}
private void SetMethod(SerializedProperty property, UnityEngine.Object target, MethodInfo methodInfo, bool dynamic) {
SerializedProperty targetProp = property.FindPropertyRelative("_target");
targetProp.objectReferenceValue = target;
SerializedProperty methodProp = property.FindPropertyRelative("_methodName");
methodProp.stringValue = methodInfo.Name;
SerializedProperty dynamicProp = property.FindPropertyRelative("_dynamic");
dynamicProp.boolValue = dynamic;
SerializedProperty argProp = property.FindPropertyRelative("_args");
ParameterInfo[] parameters = methodInfo.GetParameters();
argProp.arraySize = parameters.Length;
for (int i = 0; i < parameters.Length; i++) {
argProp.FindPropertyRelative("Array.data[" + i + "].argType").enumValueIndex = (int) Arg.FromRealType(parameters[i].ParameterType);
argProp.FindPropertyRelative("Array.data[" + i + "]._typeName").stringValue = parameters[i].ParameterType.AssemblyQualifiedName;
}
property.FindPropertyRelative("dirty").boolValue = true;
property.serializedObject.ApplyModifiedProperties();
property.serializedObject.Update();
}
private static string GetTypeName(Type t) {
if (t == typeof(int)) return "int";
else if (t == typeof(float)) return "float";
else if (t == typeof(string)) return "string";
else if (t == typeof(bool)) return "bool";
else if (t == typeof(void)) return "void";
else return t.Name;
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) {
float lineheight = EditorGUIUtility.standardVerticalSpacing + EditorGUIUtility.singleLineHeight;
SerializedProperty targetProp = property.FindPropertyRelative("_target");
SerializedProperty argProps = property.FindPropertyRelative("_args");
SerializedProperty dynamicProp = property.FindPropertyRelative("_dynamic");
float height = lineheight + lineheight;
if (targetProp.objectReferenceValue != null && targetProp.objectReferenceValue is MonoScript) height += lineheight;
else if (targetProp.objectReferenceValue != null && !dynamicProp.boolValue) height += argProps.arraySize * lineheight;
height += 8;
return height;
}
private static SerializableCallbackBase GetDummyFunction(SerializedProperty prop) {
string stringValue = prop.FindPropertyRelative("_typeName").stringValue;
Type type = Type.GetType(stringValue, false);
SerializableCallbackBase result;
if (type == null) {
return null;
} else {
result = (Activator.CreateInstance(type) as SerializableCallbackBase);
}
return result;
}
}
================================================
FILE: Dependencies/SerializableCallback/Editor/SerializableCallbackDrawer.cs.meta
================================================
fileFormatVersion: 2
guid: 65cd8a53f6f9cf04ea4aa8e2743322fd
timeCreated: 1513845239
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Editor/Siccity.SerializableCallback.Editor.asmdef
================================================
{
"name": "Siccity.SerializableCallback.Editor",
"references": [
"GUID:11a2306c728a4b843a652ec6c2f142bc"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
================================================
FILE: Dependencies/SerializableCallback/Editor/Siccity.SerializableCallback.Editor.asmdef.meta
================================================
fileFormatVersion: 2
guid: a49fd1d25e23fd14e85d1cbf342bb06f
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Editor.meta
================================================
fileFormatVersion: 2
guid: 39c1d273b3e79e346a281e4a542a63a6
folderAsset: yes
timeCreated: 1513845239
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/LICENSE.md
================================================
MIT License
Copyright (c) 2017 Thor Brigsted
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: Dependencies/SerializableCallback/LICENSE.md.meta
================================================
fileFormatVersion: 2
guid: 664adef14643bfe44a13ce197b3a540c
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/README.md
================================================
### SerializableCallback
Lets you drag-and-drop methods with or without return values / parameters in the Unity inspector.
It uses expression trees and reflection to cache a delegate on first execution.
Usage is identical to UnityEvent

```csharp
public class MyClass : MonoBehaviour {
//These fields are shown in the inspector
public SerializableCallback callback; // supports all non-void return types
public Condition condition; // supports bool return types only
public GetProduct getProduct; // supports MyProduct return types only
void Start() {
// Callbacks can be invoked with or without parameters, and with different types
Debug.Log(callback.Invoke()); // returns object
Debug.Log(condition.Invoke()); // returns bool
Debug.Log(getProduct.Invoke(2)); // returns MyProduct
}
// As with UnityEvents, custom callbacks must have a non-generic wrapper class marked as [Serializable] in order to be serialized by Unity
[Serializable]
public class Condition : SerializableCallback<bool> {}
// Last generic type parameter is the return type, staying consistent with System.Func
[Serializable]
public class GetProduct : SerializableCallback<int, MyProduct> {}
}
```
| Performance (100000 iterations) | Time |
| -------------------------------------------- | --------- |
| bool Method(float) | 00.00304s |
| SerializedCallback<float, bool> (Persistent) | 00.01026s |
| SerializedCallback<float, bool> (Dynamic) | 00.00797s |
### Installing with Unity Package Manager
To install this project as a dependency using the Unity Package Manager,
add the following line to your project's `manifest.json`:
```
"com.github.siccity.serializablecallback": "git+https://github.com/Siccity/SerializableCallback.git"
```
Join the [Discord](https://discord.gg/qgPrHv4 "Join Discord server") server to leave feedback or get support.
================================================
FILE: Dependencies/SerializableCallback/README.md.meta
================================================
fileFormatVersion: 2
guid: b5a8c7667bbebba4ca6545be57800251
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs
================================================
using UnityEngine;
using System;
/// <summary> Add to fields of your class extending SerializableCallbackBase<T,..> to limit which types can be assigned to it. </summary>
public class TargetConstraintAttribute : PropertyAttribute {
public Type targetType;
/// <summary> Add to fields of your class extending SerializableCallbackBase<T,..> to limit which types can be assigned to it. </summary>
public TargetConstraintAttribute(Type targetType) {
this.targetType = targetType;
}
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs.meta
================================================
fileFormatVersion: 2
guid: 4b9b7d20cf54ac6489b84d21c29a4c69
timeCreated: 1536132736
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/Attributes.meta
================================================
fileFormatVersion: 2
guid: 4fd350e49301e4445a1cbe580fe9eec7
folderAsset: yes
timeCreated: 1536132750
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/InvokableCallback.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InvokableCallback<TReturn> : InvokableCallbackBase<TReturn> {
public Func<TReturn> func;
public TReturn Invoke() {
return func();
}
public override TReturn Invoke(params object[] args) {
return func();
}
/// <summary> Constructor </summary>
public InvokableCallback(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
func = () => default(TReturn);
} else {
func = (System.Func<TReturn>) System.Delegate.CreateDelegate(typeof(System.Func<TReturn>), target, methodName);
}
}
}
public class InvokableCallback<T0, TReturn> : InvokableCallbackBase<TReturn> {
public Func<T0, TReturn> func;
public TReturn Invoke(T0 arg0) {
return func(arg0);
}
public override TReturn Invoke(params object[] args) {
// Convert from special "unity-nulls" to true null
if (args[0] is UnityEngine.Object && (UnityEngine.Object) args[0] == null) args[0] = null;
return func((T0) args[0]);
}
/// <summary> Constructor </summary>
public InvokableCallback(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
func = x => default(TReturn);
} else {
func = (System.Func<T0, TReturn>) System.Delegate.CreateDelegate(typeof(System.Func<T0, TReturn>), target, methodName);
}
}
}
public class InvokableCallback<T0, T1, TReturn> : InvokableCallbackBase<TReturn> {
public Func<T0, T1, TReturn> func;
public TReturn Invoke(T0 arg0, T1 arg1) {
return func(arg0, arg1);
}
public override TReturn Invoke(params object[] args) {
// Convert from special "unity-nulls" to true null
if (args[0] is UnityEngine.Object && (UnityEngine.Object) args[0] == null) args[0] = null;
if (args[1] is UnityEngine.Object && (UnityEngine.Object) args[1] == null) args[1] = null;
return func((T0) args[0], (T1) args[1]);
}
/// <summary> Constructor </summary>
public InvokableCallback(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
func = (x, y) => default(TReturn);
} else {
func = (System.Func<T0, T1, TReturn>) System.Delegate.CreateDelegate(typeof(System.Func<T0, T1, TReturn>), target, methodName);
}
}
}
public class InvokableCallback<T0, T1, T2, TReturn> : InvokableCallbackBase<TReturn> {
public Func<T0, T1, T2, TReturn> func;
public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
return func(arg0, arg1, arg2);
}
public override TReturn Invoke(params object[] args) {
// Convert from special "unity-nulls" to true null
if (args[0] is UnityEngine.Object && (UnityEngine.Object) args[0] == null) args[0] = null;
if (args[1] is UnityEngine.Object && (UnityEngine.Object) args[1] == null) args[1] = null;
if (args[2] is UnityEngine.Object && (UnityEngine.Object) args[2] == null) args[2] = null;
return func((T0) args[0], (T1) args[1], (T2) args[2]);
}
/// <summary> Constructor </summary>
public InvokableCallback(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
func = (x, y, z) => default(TReturn);
} else {
func = (System.Func<T0, T1, T2, TReturn>) System.Delegate.CreateDelegate(typeof(System.Func<T0, T1, T2, TReturn>), target, methodName);
}
}
}
public class InvokableCallback<T0, T1, T2, T3, TReturn> : InvokableCallbackBase<TReturn> {
public Func<T0, T1, T2, T3, TReturn> func;
public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
return func(arg0, arg1, arg2, arg3);
}
public override TReturn Invoke(params object[] args) {
// Convert from special "unity-nulls" to true null
if (args[0] is UnityEngine.Object && (UnityEngine.Object) args[0] == null) args[0] = null;
if (args[1] is UnityEngine.Object && (UnityEngine.Object) args[1] == null) args[1] = null;
if (args[2] is UnityEngine.Object && (UnityEngine.Object) args[2] == null) args[2] = null;
if (args[3] is UnityEngine.Object && (UnityEngine.Object) args[3] == null) args[3] = null;
return func((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3]);
}
/// <summary> Constructor </summary>
public InvokableCallback(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
func = (x, y, z, w) => default(TReturn);
} else {
func = (System.Func<T0, T1, T2, T3, TReturn>) System.Delegate.CreateDelegate(typeof(System.Func<T0, T1, T2, T3, TReturn>), target, methodName);
}
}
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/InvokableCallback.cs.meta
================================================
fileFormatVersion: 2
guid: ca67a6ce15814b743b8e123c175ce649
timeCreated: 1515587326
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/InvokableCallbackBase.cs
================================================
public abstract class InvokableCallbackBase<TReturn> {
public abstract TReturn Invoke(params object[] args);
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/InvokableCallbackBase.cs.meta
================================================
fileFormatVersion: 2
guid: 9147523dbcc2f2f46878180063444518
timeCreated: 1515583421
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/InvokableEvent.cs
================================================
using System;
public class InvokableEvent : InvokableEventBase {
public System.Action action;
public void Invoke() {
action();
}
public override void Invoke(params object[] args) {
action();
}
/// <summary> Constructor </summary>
public InvokableEvent(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
action = () => { };
} else {
action = (System.Action) System.Delegate.CreateDelegate(typeof(System.Action), target, methodName);
}
}
}
public class InvokableEvent<T0> : InvokableEventBase {
public Action<T0> action;
public void Invoke(T0 arg0) {
action(arg0);
}
public override void Invoke(params object[] args) {
action((T0) args[0]);
}
/// <summary> Constructor </summary>
public InvokableEvent(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
action = x => { };
} else {
action = (System.Action<T0>) System.Delegate.CreateDelegate(typeof(System.Action<T0>), target, methodName);
}
}
}
public class InvokableEvent<T0, T1> : InvokableEventBase {
public Action<T0, T1> action;
public void Invoke(T0 arg0, T1 arg1) {
action(arg0, arg1);
}
public override void Invoke(params object[] args) {
action((T0) args[0], (T1) args[1]);
}
/// <summary> Constructor </summary>
public InvokableEvent(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
action = (x, y) => { };
} else {
action = (System.Action<T0, T1>) System.Delegate.CreateDelegate(typeof(System.Action<T0, T1>), target, methodName);
}
}
}
public class InvokableEvent<T0, T1, T2> : InvokableEventBase {
public Action<T0, T1, T2> action;
public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
action(arg0, arg1, arg2);
}
public override void Invoke(params object[] args) {
action((T0) args[0], (T1) args[1], (T2) args[2]);
}
/// <summary> Constructor </summary>
public InvokableEvent(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
action = (x, y, z) => { };
} else {
action = (System.Action<T0, T1, T2>) System.Delegate.CreateDelegate(typeof(System.Action<T0, T1, T2>), target, methodName);
}
}
}
public class InvokableEvent<T0, T1, T2, T3> : InvokableEventBase {
public Action<T0, T1, T2, T3> action;
public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
action(arg0, arg1, arg2, arg3);
}
public override void Invoke(params object[] args) {
action((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3]);
}
/// <summary> Constructor </summary>
public InvokableEvent(object target, string methodName) {
if (target == null || string.IsNullOrEmpty(methodName)) {
action = (x, y, z, w) => { };
} else {
action = (System.Action<T0, T1, T2, T3>) System.Delegate.CreateDelegate(typeof(System.Action<T0, T1, T2, T3>), target, methodName);
}
}
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/InvokableEvent.cs.meta
================================================
fileFormatVersion: 2
guid: 51f8a42e6f95b694cb28ca372e32aef3
timeCreated: 1515748293
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/InvokableEventBase.cs
================================================
public abstract class InvokableEventBase {
public abstract void Invoke(params object[] args);
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/InvokableEventBase.cs.meta
================================================
fileFormatVersion: 2
guid: e958262ec96656d459752d5df5faa52e
timeCreated: 1515748285
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/SerializableCallback.cs
================================================
using System;
using System.Linq.Expressions;
using System.Reflection;
using UnityEngine;
public abstract class SerializableCallback<TReturn> : SerializableCallbackBase<TReturn> {
public TReturn Invoke() {
if (func == null) Cache();
if (_dynamic) {
InvokableCallback<TReturn> call = func as InvokableCallback<TReturn>;
return call.Invoke();
} else {
return func.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
func = new InvokableCallback<TReturn>(null, null);
} else {
if (_dynamic) {
func = new InvokableCallback<TReturn>(target, methodName);
} else {
func = GetPersistentMethod();
}
}
}
}
public abstract class SerializableCallback<T0, TReturn> : SerializableCallbackBase<TReturn> {
public TReturn Invoke(T0 arg0) {
if (func == null) Cache();
if (_dynamic) {
InvokableCallback<T0, TReturn> call = func as InvokableCallback<T0, TReturn>;
return call.Invoke(arg0);
} else {
return func.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
func = new InvokableCallback<T0, TReturn>(null, null);
} else {
if (_dynamic) {
func = new InvokableCallback<T0, TReturn>(target, methodName);
} else {
func = GetPersistentMethod();
}
}
}
}
public abstract class SerializableCallback<T0, T1, TReturn> : SerializableCallbackBase<TReturn> {
public TReturn Invoke(T0 arg0, T1 arg1) {
if (func == null) Cache();
if (_dynamic) {
InvokableCallback<T0, T1, TReturn> call = func as InvokableCallback<T0, T1, TReturn>;
return call.Invoke(arg0, arg1);
} else {
return func.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
func = new InvokableCallback<T0, T1, TReturn>(null, null);
} else {
if (_dynamic) {
func = new InvokableCallback<T0, T1, TReturn>(target, methodName);
} else {
func = GetPersistentMethod();
}
}
}
}
public abstract class SerializableCallback<T0, T1, T2, TReturn> : SerializableCallbackBase<TReturn> {
public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
if (func == null) Cache();
if (_dynamic) {
InvokableCallback<T0, T1, T2, TReturn> call = func as InvokableCallback<T0, T1, T2, TReturn>;
return call.Invoke(arg0, arg1, arg2);
} else {
return func.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
func = new InvokableCallback<T0, T1, T2, TReturn>(null, null);
} else {
if (_dynamic) {
func = new InvokableCallback<T0, T1, T2, TReturn>(target, methodName);
} else {
func = GetPersistentMethod();
}
}
}
}
public abstract class SerializableCallback<T0, T1, T2, T3, TReturn> : SerializableCallbackBase<TReturn> {
public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
if (func == null) Cache();
if (_dynamic) {
InvokableCallback<T0, T1, T2, T3, TReturn> call = func as InvokableCallback<T0, T1, T2, T3, TReturn>;
return call.Invoke(arg0, arg1, arg2, arg3);
} else {
return func.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
func = new InvokableCallback<T0, T1, T2, T3, TReturn>(null, null);
} else {
if (_dynamic) {
func = new InvokableCallback<T0, T1, T2, T3, TReturn>(target, methodName);
} else {
func = GetPersistentMethod();
}
}
}
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/SerializableCallback.cs.meta
================================================
fileFormatVersion: 2
guid: dc926a8278d45964e842b3ee4b9e593b
timeCreated: 1513845239
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/SerializableCallbackBase.cs
================================================
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using UnityEngine;
using Object = UnityEngine.Object;
public abstract class SerializableCallbackBase<TReturn> : SerializableCallbackBase {
public InvokableCallbackBase<TReturn> func;
public override void ClearCache() {
base.ClearCache();
func = null;
}
protected InvokableCallbackBase<TReturn> GetPersistentMethod() {
Type[] types = new Type[ArgRealTypes.Length + 1];
Array.Copy(ArgRealTypes, types, ArgRealTypes.Length);
types[types.Length - 1] = typeof(TReturn);
Type genericType = null;
switch (types.Length) {
case 1:
genericType = typeof(InvokableCallback<>).MakeGenericType(types);
break;
case 2:
genericType = typeof(InvokableCallback<,>).MakeGenericType(types);
break;
case 3:
genericType = typeof(InvokableCallback<, ,>).MakeGenericType(types);
break;
case 4:
genericType = typeof(InvokableCallback<, , ,>).MakeGenericType(types);
break;
case 5:
genericType = typeof(InvokableCallback<, , , ,>).MakeGenericType(types);
break;
default:
throw new ArgumentException(types.Length + "args");
}
return Activator.CreateInstance(genericType, new object[] { target, methodName }) as InvokableCallbackBase<TReturn>;
}
}
/// <summary> An inspector-friendly serializable function </summary>
[System.Serializable]
public abstract class SerializableCallbackBase : ISerializationCallbackReceiver {
/// <summary> Target object </summary>
public Object target { get { return _target; } set { _target = value; ClearCache(); } }
/// <summary> Target method name </summary>
public string methodName { get { return _methodName; } set { _methodName = value; ClearCache(); } }
public object[] Args { get { return args != null ? args : args = _args.Select(x => x.GetValue()).ToArray(); } }
public object[] args;
public Type[] ArgTypes { get { return argTypes != null ? argTypes : argTypes = _args.Select(x => Arg.RealType(x.argType)).ToArray(); } }
public Type[] argTypes;
public Type[] ArgRealTypes { get { return argRealTypes != null ? argRealTypes : argRealTypes = _args.Select(x => Type.GetType(x._typeName)).ToArray(); } }
public Type[] argRealTypes;
public bool dynamic { get { return _dynamic; } set { _dynamic = value; ClearCache(); } }
[SerializeField] protected Object _target;
[SerializeField] protected string _methodName;
[SerializeField] protected Arg[] _args;
[SerializeField] protected bool _dynamic;
#pragma warning disable 0414
[SerializeField] private string _typeName;
#pragma warning restore 0414
[SerializeField] private bool dirty;
#if UNITY_EDITOR
protected SerializableCallbackBase() {
_typeName = base.GetType().AssemblyQualifiedName;
}
#endif
public virtual void ClearCache() {
argTypes = null;
args = null;
}
public void SetMethod(Object target, string methodName, bool dynamic, params Arg[] args) {
_target = target;
_methodName = methodName;
_dynamic = dynamic;
_args = args;
ClearCache();
}
protected abstract void Cache();
public void OnBeforeSerialize() {
#if UNITY_EDITOR
if (dirty) { ClearCache(); dirty = false; }
#endif
}
public void OnAfterDeserialize() {
#if UNITY_EDITOR
_typeName = base.GetType().AssemblyQualifiedName;
#endif
}
}
[System.Serializable]
public struct Arg {
public enum ArgType { Unsupported, Bool, Int, Float, String, Object }
public bool boolValue;
public int intValue;
public float floatValue;
public string stringValue;
public Object objectValue;
public ArgType argType;
public string _typeName;
public object GetValue() {
return GetValue(argType);
}
public object GetValue(ArgType type) {
switch (type) {
case ArgType.Bool:
return boolValue;
case ArgType.Int:
return intValue;
case ArgType.Float:
return floatValue;
case ArgType.String:
return stringValue;
case ArgType.Object:
return objectValue;
default:
return null;
}
}
public static Type RealType(ArgType type) {
switch (type) {
case ArgType.Bool:
return typeof(bool);
case ArgType.Int:
return typeof(int);
case ArgType.Float:
return typeof(float);
case ArgType.String:
return typeof(string);
case ArgType.Object:
return typeof(Object);
default:
return null;
}
}
public static ArgType FromRealType(Type type) {
if (type == typeof(bool)) return ArgType.Bool;
else if (type == typeof(int)) return ArgType.Int;
else if (type == typeof(float)) return ArgType.Float;
else if (type == typeof(String)) return ArgType.String;
else if (typeof(Object).IsAssignableFrom(type)) return ArgType.Object;
else return ArgType.Unsupported;
}
public static bool IsSupported(Type type) {
return FromRealType(type) != ArgType.Unsupported;
}
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/SerializableCallbackBase.cs.meta
================================================
fileFormatVersion: 2
guid: 7281861ef496a34429213165496d8cf3
timeCreated: 1513845239
licenseType: Pro
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/SerializableEvent.cs
================================================
[System.Serializable]
public class SerializableEvent : SerializableEventBase {
public void Invoke() {
if (invokable == null) Cache();
if (_dynamic) {
InvokableEvent call = invokable as InvokableEvent;
call.Invoke();
} else {
invokable.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
invokable = new InvokableEvent(null, null);
} else {
if (_dynamic) {
invokable = new InvokableEvent(target, methodName);
} else {
invokable = GetPersistentMethod();
}
}
}
}
public abstract class SerializableEvent<T0> : SerializableEventBase {
public void Invoke(T0 arg0) {
if (invokable == null) Cache();
if (_dynamic) {
InvokableEvent<T0> call = invokable as InvokableEvent<T0>;
call.Invoke(arg0);
} else {
invokable.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
invokable = new InvokableEvent<T0>(null, null);
} else {
if (_dynamic) {
invokable = new InvokableEvent<T0>(target, methodName);
} else {
invokable = GetPersistentMethod();
}
}
}
}
public abstract class SerializableEvent<T0, T1> : SerializableEventBase {
public void Invoke(T0 arg0, T1 arg1) {
if (invokable == null) Cache();
if (_dynamic) {
InvokableEvent<T0, T1> call = invokable as InvokableEvent<T0, T1>;
call.Invoke(arg0, arg1);
} else {
invokable.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
invokable = new InvokableEvent<T0, T1>(null, null);
} else {
if (_dynamic) {
invokable = new InvokableEvent<T0, T1>(target, methodName);
} else {
invokable = GetPersistentMethod();
}
}
}
}
public abstract class SerializableEvent<T0, T1, T2> : SerializableEventBase {
public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
if (invokable == null) Cache();
if (_dynamic) {
InvokableEvent<T0, T1, T2> call = invokable as InvokableEvent<T0, T1, T2>;
call.Invoke(arg0, arg1, arg2);
} else {
invokable.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
invokable = new InvokableEvent<T0, T1, T2>(null, null);
} else {
if (_dynamic) {
invokable = new InvokableEvent<T0, T1, T2>(target, methodName);
} else {
invokable = GetPersistentMethod();
}
}
}
}
public abstract class SerializableEvent<T0, T1, T2, T3> : SerializableEventBase {
public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
if (invokable == null) Cache();
if (_dynamic) {
InvokableEvent<T0, T1, T2, T3> call = invokable as InvokableEvent<T0, T1, T2, T3>;
call.Invoke(arg0, arg1, arg2, arg3);
} else {
invokable.Invoke(Args);
}
}
protected override void Cache() {
if (_target == null || string.IsNullOrEmpty(_methodName)) {
invokable = new InvokableEvent<T0, T1, T2, T3>(null, null);
} else {
if (_dynamic) {
invokable = new InvokableEvent<T0, T1, T2, T3>(target, methodName);
} else {
invokable = GetPersistentMethod();
}
}
}
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/SerializableEvent.cs.meta
================================================
fileFormatVersion: 2
guid: 874a1a13ec4740a4387fe34d59931868
timeCreated: 1515747693
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/SerializableEventBase.cs
================================================
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public abstract class SerializableEventBase : SerializableCallbackBase {
public InvokableEventBase invokable;
public override void ClearCache() {
base.ClearCache();
invokable = null;
}
protected InvokableEventBase GetPersistentMethod() {
Type[] types = new Type[ArgTypes.Length];
Array.Copy(ArgTypes, types, ArgTypes.Length);
Type genericType = null;
switch (types.Length) {
case 0:
genericType = typeof(InvokableEvent);
break;
case 1:
genericType = typeof(InvokableEvent<>).MakeGenericType(types);
break;
case 2:
genericType = typeof(InvokableEvent<,>).MakeGenericType(types);
break;
case 3:
genericType = typeof(InvokableEvent<, ,>).MakeGenericType(types);
break;
case 4:
genericType = typeof(InvokableEvent<, , ,>).MakeGenericType(types);
break;
default:
throw new ArgumentException(types.Length + "args");
}
return Activator.CreateInstance(genericType, new object[] { target, methodName }) as InvokableEventBase;
}
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/SerializableEventBase.cs.meta
================================================
fileFormatVersion: 2
guid: e5856b88cee94a64c95101c3f3de4754
timeCreated: 1515747887
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/Siccity.SerializableCallback.asmdef
================================================
{
"name": "Siccity.SerializableCallback",
"references": [],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
================================================
FILE: Dependencies/SerializableCallback/Runtime/Siccity.SerializableCallback.asmdef.meta
================================================
fileFormatVersion: 2
guid: 11a2306c728a4b843a652ec6c2f142bc
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime/Test.cs
================================================
using System;
using System.Diagnostics;
using UnityEngine;
public class Test : MonoBehaviour {
const int ITERATIONS = 100000;
public float f = 0.5f;
public string s;
public System.Func<float, bool> RegularDelegate;
public System.Func<float, bool> DynamicDelegate;
public Condition condition;
public SerializableEvent ev;
void Start() {
RegularDelegate = TestMethod;
DynamicDelegate = (System.Func<float, bool>) System.Delegate.CreateDelegate(typeof(System.Func<float, bool>), this, "TestMethod");
condition.Invoke(f);
}
void Update() {
var method = Stopwatch.StartNew();
bool methodb = false;
for (int i = 0; i < ITERATIONS; ++i) {
methodb = TestMethod(f);
}
method.Stop();
var regularDelegate = Stopwatch.StartNew();
bool regularDelegateb = false;
for (int i = 0; i < ITERATIONS; ++i) {
regularDelegateb = RegularDelegate(f);
}
regularDelegate.Stop();
var dynamicDelegate = Stopwatch.StartNew();
bool dynamicDelegateb = false;
for (int i = 0; i < ITERATIONS; ++i) {
dynamicDelegateb = DynamicDelegate(f);
}
dynamicDelegate.Stop();
var serializedDelegate = Stopwatch.StartNew();
bool serializedDelegateb = false;
for (int i = 0; i < ITERATIONS; ++i) {
serializedDelegateb = condition.Invoke(f);
}
serializedDelegate.Stop();
var serializedEvent = Stopwatch.StartNew();
for (int i = 0; i < ITERATIONS; ++i) {
ev.Invoke();
}
serializedEvent.Stop();
UnityEngine.Debug.Log("Method: " + methodb + method.Elapsed);
UnityEngine.Debug.Log("RegularDelegate: " + regularDelegateb + regularDelegate.Elapsed);
UnityEngine.Debug.Log("DynamicDelegate: " + dynamicDelegateb + dynamicDelegate.Elapsed);
UnityEngine.Debug.Log("SerializedCallback: " + serializedDelegateb + serializedDelegate.Elapsed);
UnityEngine.Debug.Log("SerializedEvent: " + serializedEvent.Elapsed);
}
public bool TestMethod(float f) {
return f > 0.5f;
}
public bool TestMethod(string a) {
return string.IsNullOrEmpty(a);
}
public bool TestMethod2(float f, string a) {
return f > 0.5f && string.IsNullOrEmpty(a);
}
public void TestMethod2(string a) {
s = a;
}
}
[Serializable]
public class Condition : SerializableCallback<float, bool> { }
================================================
FILE: Dependencies/SerializableCallback/Runtime/Test.cs.meta
================================================
fileFormatVersion: 2
guid: 933cfc79696bbd74ca51c70a8d61ae8d
timeCreated: 1514107717
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/Runtime.meta
================================================
fileFormatVersion: 2
guid: a6c274949c3a3494db6ab4e33e996353
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback/package.json
================================================
{
"name": "com.github.siccity.serializablecallback",
"description": "UnityEvent and System.Func had a child. Lets you drag-and-drop methods with or without return values / parameters in the Unity inspector. It uses expression trees and reflection to cache a delegate on first execution. Usage is identical to UnityEvent",
"version": "1.0.0",
"unity": "2018.1",
"displayName": "SerializableCallback",
"author": {
"name": "Thor Brigsted",
"url": "http://thorbrigsted.com/"
}
}
================================================
FILE: Dependencies/SerializableCallback/package.json.meta
================================================
fileFormatVersion: 2
guid: 70b54a564f424a742af19bd2af6873c5
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableCallback.meta
================================================
fileFormatVersion: 2
guid: e9d9d85b74d78594b85a4a679b74607f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableDictionary/Editor/SerializableDictionary.Editor.asmdef
================================================
{
"name": "SerializableDictionary.Editor",
"rootNamespace": "",
"references": [
"GUID:479678a6fc2d434439a70c037334ff05"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
================================================
FILE: Dependencies/SerializableDictionary/Editor/SerializableDictionary.Editor.asmdef.meta
================================================
fileFormatVersion: 2
guid: 5debd524d9fe37b44aa7aede833a8eb7
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableDictionary/Editor/SerializableDictionaryPropertyDrawer.cs
================================================
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System;
public class SerializableDictionaryPropertyDrawer : PropertyDrawer
{
const string KeysFieldName = "m_keys";
const string ValuesFieldName = "m_values";
protected const float IndentWidth = 15f;
static GUIContent s_iconPlus = IconContent ("Toolbar Plus", "Add entry");
static GUIContent s_iconMinus = IconContent ("Toolbar Minus", "Remove entry");
static GUIContent s_warningIconConflict = IconContent ("console.warnicon.sml", "Conflicting key, this entry will be lost");
static GUIContent s_warningIconOther = IconContent ("console.infoicon.sml", "Conflicting key");
static GUIContent s_warningIconNull = IconContent ("console.warnicon.sml", "Null key, this entry will be lost");
static GUIStyle s_buttonStyle = GUIStyle.none;
static GUIContent s_tempContent = new GUIContent();
class ConflictState
{
public object conflictKey = null;
public object conflictValue = null;
public int conflictIndex = -1 ;
public int conflictOtherIndex = -1 ;
public bool conflictKeyPropertyExpanded = false;
public bool conflictValuePropertyExpanded = false;
public float conflictLineHeight = 0f;
}
struct PropertyIdentity
{
public PropertyIdentity(SerializedProperty property)
{
this.instance = property.serializedObject.targetObject;
this.propertyPath = property.propertyPath;
}
public UnityEngine.Object instance;
public string propertyPath;
}
static Dictionary<PropertyIdentity, ConflictState> s_conflictStateDict = new Dictionary<PropertyIdentity, ConflictState>();
enum Action
{
None,
Add,
Remove
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
label = EditorGUI.BeginProperty(position, label, property);
Action buttonAction = Action.None;
int buttonActionIndex = 0;
var keyArrayProperty = property.FindPropertyRelative(KeysFieldName);
var valueArrayProperty = property.FindPropertyRelative(ValuesFieldName);
ConflictState conflictState = GetConflictState(property);
if(conflictState.conflictIndex != -1)
{
keyArrayProperty.InsertArrayElementAtIndex(conflictState.conflictIndex);
var keyProperty = keyArrayProperty.GetArrayElementAtIndex(conflictState.conflictIndex);
SetPropertyValue(keyProperty, conflictState.conflictKey);
keyProperty.isExpanded = conflictState.conflictKeyPropertyExpanded;
valueArrayProperty.InsertArrayElementAtIndex(conflictState.conflictIndex);
var valueProperty = valueArrayProperty.GetArrayElementAtIndex(conflictState.conflictIndex);
SetPropertyValue(valueProperty, conflictState.conflictValue);
valueProperty.isExpanded = conflictState.conflictValuePropertyExpanded;
}
var buttonWidth = s_buttonStyle.CalcSize(s_iconPlus).x;
var labelPosition = position;
labelPosition.height = EditorGUIUtility.singleLineHeight;
if (property.isExpanded)
labelPosition.xMax -= s_buttonStyle.CalcSize(s_iconPlus).x;
EditorGUI.PropertyField(labelPosition, property, label, false);
// property.isExpanded = EditorGUI.Foldout(labelPosition, property.isExpanded, label);
if (property.isExpanded)
{
var buttonPosition = position;
buttonPosition.xMin = buttonPosition.xMax - buttonWidth;
buttonPosition.height = EditorGUIUtility.singleLineHeight;
EditorGUI.BeginDisabledGroup(conflictState.conflictIndex != -1);
if(GUI.Button(buttonPosition, s_iconPlus, s_buttonStyle))
{
buttonAction = Action.Add;
buttonActionIndex = keyArrayProperty.arraySize;
}
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel++;
var linePosition = position;
linePosition.y += EditorGUIUtility.singleLineHeight;
linePosition.xMax -= buttonWidth;
foreach(var entry in EnumerateEntries(keyArrayProperty, valueArrayProperty))
{
var keyProperty = entry.keyProperty;
var valueProperty = entry.valueProperty;
int i = entry.index;
float lineHeight = DrawKeyValueLine(keyProperty, valueProperty, linePosition, i);
buttonPosition = linePosition;
buttonPosition.x = linePosition.xMax;
buttonPosition.height = EditorGUIUtility.singleLineHeight;
if(GUI.Button(buttonPosition, s_iconMinus, s_buttonStyle))
{
buttonAction = Action.Remove;
buttonActionIndex = i;
}
if(i == conflictState.conflictIndex && conflictState.conflictOtherIndex == -1)
{
var iconPosition = linePosition;
iconPosition.size = s_buttonStyle.CalcSize(s_warningIconNull);
GUI.Label(iconPosition, s_warningIconNull);
}
else if(i == conflictState.conflictIndex)
{
var iconPosition = linePosition;
iconPosition.size = s_buttonStyle.CalcSize(s_warningIconConflict);
GUI.Label(iconPosition, s_warningIconConflict);
}
else if(i == conflictState.conflictOtherIndex)
{
var iconPosition = linePosition;
iconPosition.size = s_buttonStyle.CalcSize(s_warningIconOther);
GUI.Label(iconPosition, s_warningIconOther);
}
linePosition.y += lineHeight;
}
EditorGUI.indentLevel--;
}
if(buttonAction == Action.Add)
{
keyArrayProperty.InsertArrayElementAtIndex(buttonActionIndex);
valueArrayProperty.InsertArrayElementAtIndex(buttonActionIndex);
}
else if(buttonAction == Action.Remove)
{
DeleteArrayElementAtIndex(keyArrayProperty, buttonActionIndex);
DeleteArrayElementAtIndex(valueArrayProperty, buttonActionIndex);
}
conflictState.conflictKey = null;
conflictState.conflictValue = null;
conflictState.conflictIndex = -1;
conflictState.conflictOtherIndex = -1;
conflictState.conflictLineHeight = 0f;
conflictState.conflictKeyPropertyExpanded = false;
conflictState.conflictValuePropertyExpanded = false;
foreach(var entry1 in EnumerateEntries(keyArrayProperty, valueArrayProperty))
{
var keyProperty1 = entry1.keyProperty;
int i = entry1.index;
object keyProperty1Value = GetPropertyValue(keyProperty1);
if(keyProperty1Value == null)
{
var valueProperty1 = entry1.valueProperty;
SaveProperty(keyProperty1, valueProperty1, i, -1, conflictState);
DeleteArrayElementAtIndex(valueArrayProperty, i);
DeleteArrayElementAtIndex(keyArrayProperty, i);
break;
}
foreach(var entry2 in EnumerateEntries(keyArrayProperty, valueArrayProperty, i + 1))
{
var keyProperty2 = entry2.keyProperty;
int j = entry2.index;
object keyProperty2Value = GetPropertyValue(keyProperty2);
if(ComparePropertyValues(keyProperty1Value, keyProperty2Value))
{
var valueProperty2 = entry2.valueProperty;
SaveProperty(keyProperty2, valueProperty2, j, i, conflictState);
DeleteArrayElementAtIndex(keyArrayProperty, j);
DeleteArrayElementAtIndex(valueArrayProperty, j);
goto breakLoops;
}
}
}
breakLoops:
EditorGUI.EndProperty();
}
static float DrawKeyValueLine(SerializedProperty keyProperty, SerializedProperty valueProperty, Rect linePosition, int index)
{
bool keyCanBeExpanded = CanPropertyBeExpanded(keyProperty);
bool valueCanBeExpanded = CanPropertyBeExpanded(valueProperty);
if(!keyCanBeExpanded && valueCanBeExpanded)
{
return DrawKeyValueLineExpand(keyProperty, valueProperty, linePosition);
}
else
{
var keyLabel = keyCanBeExpanded ? ("Key " + index.ToString()) : "";
var valueLabel = valueCanBeExpanded ? ("Value " + index.ToString()) : "";
return DrawKeyValueLineSimple(keyProperty, valueProperty, keyLabel, valueLabel, linePosition);
}
}
static float DrawKeyValueLineSimple(SerializedProperty keyProperty, SerializedProperty valueProperty, string keyLabel, string valueLabel, Rect linePosition)
{
float labelWidth = EditorGUIUtility.labelWidth;
float labelWidthRelative = labelWidth / linePosition.width;
float keyPropertyHeight = EditorGUI.GetPropertyHeight(keyProperty);
var keyPosition = linePosition;
keyPosition.height = keyPropertyHeight;
keyPosition.width = labelWidth - IndentWidth;
EditorGUIUtility.labelWidth = keyPosition.width * labelWidthRelative;
EditorGUI.PropertyField(keyPosition, keyProperty, TempContent(keyLabel), true);
float valuePropertyHeight = EditorGUI.GetPropertyHeight(valueProperty);
var valuePosition = linePosition;
valuePosition.height = valuePropertyHeight;
valuePosition.xMin += labelWidth;
EditorGUIUtility.labelWidth = valuePosition.width * labelWidthRelative;
EditorGUI.indentLevel--;
EditorGUI.PropertyField(valuePosition, valueProperty, TempContent(valueLabel), true);
EditorGUI.indentLevel++;
EditorGUIUtility.labelWidth = labelWidth;
return Mathf.Max(keyPropertyHeight, valuePropertyHeight);
}
static float DrawKeyValueLineExpand(SerializedProperty keyProperty, SerializedProperty valueProperty, Rect linePosition)
{
float labelWidth = EditorGUIUtility.labelWidth;
float keyPropertyHeight = EditorGUI.GetPropertyHeight(keyProperty);
var keyPosition = linePosition;
keyPosition.height = keyPropertyHeight;
keyPosition.width = labelWidth - IndentWidth;
EditorGUI.PropertyField(keyPosition, keyProperty, GUIContent.none, true);
float valuePropertyHeight = EditorGUI.GetPropertyHeight(valueProperty);
var valuePosition = linePosition;
valuePosition.height = valuePropertyHeight;
EditorGUI.PropertyField(valuePosition, valueProperty, GUIContent.none, true);
EditorGUIUtility.labelWidth = labelWidth;
return Mathf.Max(keyPropertyHeight, valuePropertyHeight);
}
static bool CanPropertyBeExpanded(SerializedProperty property)
{
switch(property.propertyType)
{
case SerializedPropertyType.Generic:
case SerializedPropertyType.Vector4:
case SerializedPropertyType.Quaternion:
return true;
default:
return false;
}
}
static void SaveProperty(SerializedProperty keyProperty, SerializedProperty valueProperty, int index, int otherIndex, ConflictState conflictState)
{
conflictState.conflictKey = GetPropertyValue(keyProperty);
conflictState.conflictValue = GetPropertyValue(valueProperty);
float keyPropertyHeight = EditorGUI.GetPropertyHeight(keyProperty);
float valuePropertyHeight = EditorGUI.GetPropertyHeight(valueProperty);
float lineHeight = Mathf.Max(keyPropertyHeight, valuePropertyHeight);
conflictState.conflictLineHeight = lineHeight;
conflictState.conflictIndex = index;
conflictState.conflictOtherIndex = otherIndex;
conflictState.conflictKeyPropertyExpanded = keyProperty.isExpanded;
conflictState.conflictValuePropertyExpanded = valueProperty.isExpanded;
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
float propertyHeight = EditorGUIUtility.singleLineHeight;
if (property.isExpanded)
{
var keysProperty = property.FindPropertyRelative(KeysFieldName);
var valuesProperty = property.FindPropertyRelative(ValuesFieldName);
foreach(var entry in EnumerateEntries(keysProperty, valuesProperty))
{
var keyProperty = entry.keyProperty;
var valueProperty = entry.valueProperty;
float keyPropertyHeight = EditorGUI.GetPropertyHeight(keyProperty);
float valuePropertyHeight = EditorGUI.GetPropertyHeight(valueProperty);
float lineHeight = Mathf.Max(keyPropertyHeight, valuePropertyHeight);
propertyHeight += lineHeight;
}
ConflictState conflictState = GetConflictState(property);
if(conflictState.conflictIndex != -1)
{
propertyHeight += conflictState.conflictLineHeight;
}
}
return propertyHeight;
}
static ConflictState GetConflictState(SerializedProperty property)
{
ConflictState conflictState;
PropertyIdentity propId = new PropertyIdentity(property);
if(!s_conflictStateDict.TryGetValue(propId, out conflictState))
{
conflictState = new ConflictState();
s_conflictStateDict.Add(propId, conflictState);
}
return conflictState;
}
static Dictionary<SerializedPropertyType, PropertyInfo> s_serializedPropertyValueAccessorsDict;
static SerializableDictionaryPropertyDrawer()
{
Dictionary<SerializedPropertyType, string> serializedPropertyValueAccessorsNameDict = new Dictionary<SerializedPropertyType, string>() {
{ SerializedPropertyType.Integer, "intValue" },
{ SerializedPropertyType.Boolean, "boolValue" },
{ SerializedPropertyType.Float, "floatValue" },
{ SerializedPropertyType.String, "stringValue" },
{ SerializedPropertyType.Color, "colorValue" },
{ SerializedPropertyType.ObjectReference, "objectReferenceValue" },
{ SerializedPropertyType.LayerMask, "intValue" },
{ SerializedPropertyType.Enum, "intValue" },
{ SerializedPropertyType.Vector2, "vector2Value" },
{ SerializedPropertyType.Vector3, "vector3Value" },
{ SerializedPropertyType.Vector4, "vector4Value" },
{ SerializedPropertyType.Rect, "rectValue" },
{ SerializedPropertyType.ArraySize, "intValue" },
{ SerializedPropertyType.Character, "intValue" },
{ SerializedPropertyType.AnimationCurve, "animationCurveValue" },
{ SerializedPropertyType.Bounds, "boundsValue" },
{ SerializedPropertyType.Quaternion, "quaternionValue" },
};
Type serializedPropertyType = typeof(SerializedProperty);
s_serializedPropertyValueAccessorsDict = new Dictionary<SerializedPropertyType, PropertyInfo>();
BindingFlags flags = BindingFlags.Instance | BindingFlags.Public;
foreach(var kvp in serializedPropertyValueAccessorsNameDict)
{
PropertyInfo propertyInfo = serializedPropertyType.GetProperty(kvp.Value, flags);
s_serializedPropertyValueAccessorsDict.Add(kvp.Key, propertyInfo);
}
}
static GUIContent IconContent(string name, string tooltip)
{
var builtinIcon = EditorGUIUtility.IconContent (name);
return new GUIContent(builtinIcon.image, tooltip);
}
static GUIContent TempContent(string text)
{
s_tempContent.text = text;
return s_tempContent;
}
static void DeleteArrayElementAtIndex(SerializedProperty arrayProperty, int index)
{
var property = arrayProperty.GetArrayElementAtIndex(index);
// if(arrayProperty.arrayElementType.StartsWith("PPtr<$"))
if(property.propertyType == SerializedPropertyType.ObjectReference)
{
property.objectReferenceValue = null;
}
arrayProperty.DeleteArrayElementAtIndex(index);
}
public static object GetPropertyValue(SerializedProperty p)
{
PropertyInfo propertyInfo;
if(s_serializedPropertyValueAccessorsDict.TryGetValue(p.propertyType, out propertyInfo))
{
return propertyInfo.GetValue(p, null);
}
else
{
if(p.isArray)
return GetPropertyValueArray(p);
else
return GetPropertyValueGeneric(p);
}
}
static void SetPropertyValue(SerializedProperty p, object v)
{
PropertyInfo propertyInfo;
if(s_serializedPropertyValueAccessorsDict.TryGetValue(p.propertyType, out propertyInfo))
{
propertyInfo.SetValue(p, v, null);
}
else
{
if(p.isArray)
SetPropertyValueArray(p, v);
else
SetPropertyValueGeneric(p, v);
}
}
static object GetPropertyValueArray(SerializedProperty property)
{
object[] array = new object[property.arraySize];
for(int i = 0; i < property.arraySize; i++)
{
SerializedProperty item = property.GetArrayElementAtIndex(i);
array[i] = GetPropertyValue(item);
}
return array;
}
static object GetPropertyValueGeneric(SerializedProperty property)
{
Dictionary<string, object> dict = new Dictionary<string, object>();
var iterator = property.Copy();
if(iterator.Next(true))
{
var end = property.GetEndProperty();
do
{
string name = iterator.name;
object value = GetPropertyValue(iterator);
dict.Add(name, value);
} while(iterator.Next(false) && iterator.propertyPath != end.propertyPath);
}
return dict;
}
static void SetPropertyValueArray(SerializedProperty property, object v)
{
object[] array = (object[]) v;
property.arraySize = array.Length;
for(int i = 0; i < property.arraySize; i++)
{
SerializedProperty item = property.GetArrayElementAtIndex(i);
SetPropertyValue(item, array[i]);
}
}
static void SetPropertyValueGeneric(SerializedProperty property, object v)
{
Dictionary<string, object> dict = (Dictionary<string, object>) v;
var iterator = property.Copy();
if(iterator.Next(true))
{
var end = property.GetEndProperty();
do
{
string name = iterator.name;
SetPropertyValue(iterator, dict[name]);
} while(iterator.Next(false) && iterator.propertyPath != end.propertyPath);
}
}
static bool ComparePropertyValues(object value1, object value2)
{
if(value1 is Dictionary<string, object> && value2 is Dictionary<string, object>)
{
var dict1 = (Dictionary<string, object>)value1;
var dict2 = (Dictionary<string, object>)value2;
return CompareDictionaries(dict1, dict2);
}
else
{
return object.Equals(value1, value2);
}
}
static bool CompareDictionaries(Dictionary<string, object> dict1, Dictionary<string, object> dict2)
{
if(dict1.Count != dict2.Count)
return false;
foreach(var kvp1 in dict1)
{
var key1 = kvp1.Key;
object value1 = kvp1.Value;
object value2;
if(!dict2.TryGetValue(key1, out value2))
return false;
if(!ComparePropertyValues(value1, value2))
return false;
}
return true;
}
struct EnumerationEntry
{
public SerializedProperty keyProperty;
public SerializedProperty valueProperty;
public int index;
public EnumerationEntry(SerializedProperty keyProperty, SerializedProperty valueProperty, int index)
{
this.keyProperty = keyProperty;
this.valueProperty = valueProperty;
this.index = index;
}
}
static IEnumerable<EnumerationEntry> EnumerateEntries(SerializedProperty keyArrayProperty, SerializedProperty valueArrayProperty, int startIndex = 0)
{
if(keyArrayProperty.arraySize > startIndex)
{
int index = startIndex;
var keyProperty = keyArrayProperty.GetArrayElementAtIndex(startIndex);
var valueProperty = valueArrayProperty.GetArrayElementAtIndex(startIndex);
var endProperty = keyArrayProperty.GetEndProperty();
do
{
yield return new EnumerationEntry(keyProperty, valueProperty, index);
index++;
} while(keyProperty.Next(false) && valueProperty.Next(false) && !SerializedProperty.EqualContents(keyProperty, endProperty));
}
}
}
public class SerializableDictionaryStoragePropertyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
property.Next(true);
EditorGUI.PropertyField(position, property, label, true);
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
property.Next(true);
return EditorGUI.GetPropertyHeight(property);
}
}
================================================
FILE: Dependencies/SerializableDictionary/Editor/SerializableDictionaryPropertyDrawer.cs.meta
================================================
fileFormatVersion: 2
guid: 91da51d02ab9ebc459d80d5965d40d19
timeCreated: 1492869349
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableDictionary/Editor.meta
================================================
fileFormatVersion: 2
guid: 20029ee1c099f4b47afbac48208879b9
folderAsset: yes
DefaultImporter:
userData:
================================================
FILE: Dependencies/SerializableDictionary/LICENSE.md
================================================
MIT License
Copyright (c) 2017 Mathieu Le Ber
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: Dependencies/SerializableDictionary/LICENSE.md.meta
================================================
fileFormatVersion: 2
guid: 2a97e78bf2f61e647b9ea0a65d08182f
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableDictionary/Runtime/SerializableDictionary.Runtime.asmdef
================================================
{
"name": "SerializableDictionary.Runtime"
}
================================================
FILE: Dependencies/SerializableDictionary/Runtime/SerializableDictionary.Runtime.asmdef.meta
================================================
fileFormatVersion: 2
guid: 479678a6fc2d434439a70c037334ff05
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableDictionary/Runtime/SerializableDictionary.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using UnityEngine;
public abstract class SerializableDictionaryBase<TKey, TValue, TValueStorage> : Dictionary<TKey, TValue>, ISerializationCallbackReceiver
{
[SerializeField]
TKey[] m_keys;
[SerializeField]
TValueStorage[] m_values;
public SerializableDictionaryBase()
{
}
public SerializableDictionaryBase(IDictionary<TKey, TValue> dict) : base(dict.Count)
{
foreach (var kvp in dict)
{
this[kvp.Key] = kvp.Value;
}
}
protected SerializableDictionaryBase(SerializationInfo info, StreamingContext context) : base(info,context){}
protected abstract void SetValue(TValueStorage[] storage, int i, TValue value);
protected abstract TValue GetValue(TValueStorage[] storage, int i);
public void CopyFrom(IDictionary<TKey, TValue> dict)
{
this.Clear();
foreach (var kvp in dict)
{
this[kvp.Key] = kvp.Value;
}
}
public void OnAfterDeserialize()
{
if(m_keys != null && m_values != null && m_keys.Length == m_values.Length)
{
this.Clear();
int n = m_keys.Length;
for(int i = 0; i < n; ++i)
{
this[m_keys[i]] = GetValue(m_values, i);
}
m_keys = null;
m_values = null;
}
}
public void OnBeforeSerialize()
{
int n = this.Count;
m_keys = new TKey[n];
m_values = new TValueStorage[n];
int i = 0;
foreach(var kvp in this)
{
m_keys[i] = kvp.Key;
SetValue(m_values, i, kvp.Value);
++i;
}
}
}
public class SerializableDictionary<TKey, TValue> : SerializableDictionaryBase<TKey, TValue, TValue>
{
public SerializableDictionary()
{
}
public SerializableDictionary(IDictionary<TKey, TValue> dict) : base(dict)
{
}
protected SerializableDictionary(SerializationInfo info, StreamingContext context) : base(info,context){}
protected override TValue GetValue(TValue[] storage, int i)
{
return storage[i];
}
protected override void SetValue(TValue[] storage, int i, TValue value)
{
storage[i] = value;
}
}
public static class SerializableDictionary
{
public class Storage<T>
{
public T data;
}
}
public class SerializableDictionary<TKey, TValue, TValueStorage> : SerializableDictionaryBase<TKey, TValue, TValueStorage> where TValueStorage : SerializableDictionary.Storage<TValue>, new()
{
public SerializableDictionary()
{
}
public SerializableDictionary(IDictionary<TKey, TValue> dict) : base(dict)
{
}
protected SerializableDictionary(SerializationInfo info, StreamingContext context) : base(info,context){}
protected override TValue GetValue(TValueStorage[] storage, int i)
{
return storage[i].data;
}
protected override void SetValue(TValueStorage[] storage, int i, TValue value)
{
storage[i] = new TValueStorage();
storage[i].data = value;
}
}
================================================
FILE: Dependencies/SerializableDictionary/Runtime/SerializableDictionary.cs.meta
================================================
fileFormatVersion: 2
guid: e7be1c9624387604fba4005ccf7dbd5a
timeCreated: 1492868176
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableDictionary/Runtime.meta
================================================
fileFormatVersion: 2
guid: 530de5b115dd7534da8f7a363e46ff21
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies/SerializableDictionary.meta
================================================
fileFormatVersion: 2
guid: fe19274f8c2b0a84792bd6eb2e84f3bd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Dependencies.meta
================================================
fileFormatVersion: 2
guid: 7347c27e9815d5940be3e3aaab93719d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Editor/AssetCallbacks/CreateDlogGraph.cs
================================================
using UnityEditor;
using UnityEditor.ProjectWindowCallback;
using UnityEngine;
namespace DialogueGraph {
internal class CreateDlogGraph : EndNameEditAction {
[MenuItem("Assets/Create/Dialogue Graph/Empty Dialogue Graph", false, 1)]
public static void CreateDialogueGraph()
{
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, CreateInstance<CreateDlogGraph>(),
$"New Dialogue Graph.{DlogGraphImporter.Extension}", Resources.Load<Texture2D>(ResourcesUtility.IconBig), null);
}
public override void Action(int instanceId, string pathName, string resourceFile) {
var dlogGraph = new DlogGraphData();
var dlogObject = CreateInstance<DlogGraphObject>();
dlogObject.Initialize(dlogGraph);
dlogObject.DlogGraph.AssetGuid = AssetDatabase.GetAssetPath(instanceId);
dlogObject.DlogGraph.DialogueGraphVersion = DialogueGraphUtility.LatestVersion;
dlogObject.AssetGuid = dlogObject.DlogGraph.AssetGuid;
DialogueGraphUtility.CreateFile(pathName, dlogObject, false);
AssetDatabase.ImportAsset(pathName);
}
}
}
================================================
FILE: Editor/AssetCallbacks/CreateDlogGraph.cs.meta
================================================
fileFormatVersion: 2
guid: 59cfb2bf5b2642d7b229cd3deef9cb50
timeCreated: 1601287977
================================================
FILE: Editor/AssetCallbacks.meta
================================================
fileFormatVersion: 2
guid: 2fa84c3ec7fe454fa441b8dcd5ac2265
timeCreated: 1601287955
================================================
FILE: Editor/DialogueGraph.Editor.asmdef
================================================
{
"name": "DialogueGraph.Editor",
"rootNamespace": "",
"references": [
"GUID:d6f4b79f0a67eb24690aba82c1078929",
"GUID:4988cf9794f41d64c884876ab6574b89",
"GUID:5debd524d9fe37b44aa7aede833a8eb7",
"GUID:479678a6fc2d434439a70c037334ff05"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"Newtonsoft.Json.dll"
],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
================================================
FILE: Editor/DialogueGraph.Editor.asmdef.meta
================================================
fileFormatVersion: 2
guid: 88c608744485bf646beed5cc3dd91a6c
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Editor/Extensions/DlogExtensions.cs
================================================
using Newtonsoft.Json;
using UnityEngine.UIElements;
namespace DialogueGraph {
public static class DlogExtensions {
public static AbstractProperty Deserialize(this SerializedProperty property) {
var type = System.Type.GetType(property.Type);
return (AbstractProperty) JsonConvert.DeserializeObject(property.Data, type, new JsonSerializerSettings {TypeNameHandling = TypeNameHandling.All});
}
public static void InjectCustomStyle(this DlogPort port) {
var cap = port.Q("cap");
var width = cap.style.width;
width.value = new Length(8, LengthUnit.Pixel);
cap.style.width = width;
var height = cap.style.height;
height.value = new Length(12, LengthUnit.Pixel);
cap.style.height = height;
// Border color
var bLColor = cap.style.borderLeftColor;
bLColor.value = port.portColor;
cap.style.borderLeftColor = bLColor;
var bTColor = cap.style.borderTopColor;
bTColor.value = port.portColor;
cap.style.borderTopColor = bTColor;
var bRColor = cap.style.borderRightColor;
bRColor.value = port.portColor;
cap.style.borderRightColor = bRColor;
var bBColor = cap.style.borderBottomColor;
bBColor.value = port.portColor;
cap.style.borderBottomColor = bBColor;
}
}
}
================================================
FILE: Editor/Extensions/DlogExtensions.cs.meta
================================================
fileFormatVersion: 2
guid: 6c473de560d3477fa93a162cabb53e0e
timeCreated: 1603619074
================================================
FILE: Editor/Extensions/GUILayoutHelper.cs
================================================
using System;
using UnityEngine;
namespace DialogueGraph {
public static class GUILayoutHelper {
public static void BeginCenterVertically() {
GUILayout.BeginHorizontal();
GUILayout.BeginVertical();
GUILayout.FlexibleSpace();
}
public static void EndCenterVertically() {
GUILayout.FlexibleSpace();
GUILayout.EndVertical();
GUILayout.EndHorizontal();
}
public static void CenterVertically(Action drawGUI) {
BeginCenterVertically();
drawGUI();
EndCenterVertically();
}
}
}
================================================
FILE: Editor/Extensions/GUILayoutHelper.cs.meta
================================================
fileFormatVersion: 2
guid: b82632cfd46f4b8ca42700903771073e
timeCreated: 1606319893
================================================
FILE: Editor/Extensions/GraphViewExtensions.cs
================================================
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using UnityEngine.UIElements;
namespace DialogueGraph {
public static class GraphViewExtensions {
public static void InsertCopyPasteData(this DlogGraphView graphView, CopyPasteData copyPasteData) {
if (copyPasteData == null) return;
foreach (var property in copyPasteData.Properties) {
var copy = property.Copy();
graphView.DlogGraph.SanitizePropertyName(copy);
graphView.DlogGraph.SanitizePropertyReference(copy, property.OverrideReferenceName);
graphView.DlogGraph.AddProperty(copy);
var dependentNodes = copyPasteData.Nodes.Where(node => node.Type == typeof(PropertyNode).FullName);
foreach (var node in dependentNodes) {
var root = JObject.Parse(node.NodeData);
root["propertyGuid"] = copy.GUID;
node.NodeData = root.ToString(Formatting.None);
}
}
var remappedNodes = new List<SerializedNode>();
var remappedEdges = new List<SerializedEdge>();
graphView.DlogGraph.Paste(copyPasteData, remappedNodes, remappedEdges);
// Compute the mean of the copied nodes.
var centroid = Vector2.zero;
var count = 1;
foreach (var node in remappedNodes) {
var position = node.DrawState.Position.position;
centroid += (position - centroid) / count;
++count;
}
// Get the center of the current view
var viewCenter = graphView.contentViewContainer.WorldToLocal(graphView.layout.center);
foreach (var node in remappedNodes) {
var drawState = node.DrawState;
var positionRect = drawState.Position;
var position = positionRect.position;
position += viewCenter - centroid;
positionRect.position = position;
drawState.Position = positionRect;
node.DrawState = drawState;
}
graphView.ClearSelection();
graphView.DlogGraph.QueueSelection(remappedNodes, remappedEdges);
}
}
}
================================================
FILE: Editor/Extensions/GraphViewExtensions.cs.meta
================================================
fileFormatVersion: 2
guid: 9170694da96b489daea9c57d451d8470
timeCreated: 1602766163
================================================
FILE: Editor/Extensions/VisualElementExtensions.cs
================================================
using UnityEngine;
using UnityEngine.UIElements;
namespace DialogueGraph {
public static class VisualElementExtensions {
public static void AddStyleSheet(this VisualElement element, string path) {
var stylesheet = Resources.Load<StyleSheet>(path);
if(stylesheet == null) Debug.LogWarning($"StyleSheet at path \"{path}\" could not be found");
else element.styleSheets.Add(stylesheet);
}
}
}
================================================
FILE: Editor/Extensions/VisualElementExtensions.cs.meta
================================================
fileFormatVersion: 2
guid: 229e7e4f55474e20ad013144d24a39ae
timeCreated: 1601282440
================================================
FILE: Editor/Extensions.meta
================================================
fileFormatVersion: 2
guid: 2a94fe7d0d1e46e7ac194f7ab65aafb1
timeCreated: 1601282428
================================================
FILE: Editor/Graph/Attributes/TitleAttribute.cs
================================================
using System;
namespace DialogueGraph {
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class TitleAttribute : Attribute {
public readonly string[] Title;
public TitleAttribute(params string[] title) {
Title = title;
}
}
}
================================================
FILE: Editor/Graph/Attributes/TitleAttribute.cs.meta
================================================
fileFormatVersion: 2
guid: c6b5cce28add4b3cb603e233a3926bd1
timeCreated: 1601474130
================================================
FILE: Editor/Graph/Attributes.meta
================================================
fileFormatVersion: 2
guid: 2710773280374843a854a2c722541286
timeCreated: 1601474123
================================================
FILE: Editor/Graph/Data/CopyPasteData.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace DialogueGraph {
[Serializable]
public class CopyPasteData : ISerializationCallbackReceiver {
[NonSerialized] private HashSet<SerializedNode> nodes = new HashSet<SerializedNode>();
[NonSerialized] private HashSet<SerializedEdge> edges = new HashSet<SerializedEdge>();
[NonSerialized] private HashSet<AbstractProperty> properties = new HashSet<AbstractProperty>();
// these are the properties that don't get copied but are required by property nodes that get copied
[NonSerialized] private HashSet<AbstractProperty> metaProperties = new HashSet<AbstractProperty>();
[SerializeField] private List<SerializedNode> serializedNodes = new List<SerializedNode>();
[SerializeField] private List<SerializedEdge> serializedEdges = new List<SerializedEdge>();
[SerializeField] private List<SerializedProperty> serializedProperties = new List<SerializedProperty>();
[SerializeField] private List<SerializedProperty> serializedMetaProperties = new List<SerializedProperty>();
public IEnumerable<SerializedNode> Nodes => nodes;
public IEnumerable<SerializedEdge> Edges => edges;
public IEnumerable<SerializedNode> SerializedNodes => serializedNodes;
public IEnumerable<SerializedEdge> SerializedEdges => serializedEdges;
public IEnumerable<SerializedProperty> SerializedProperties => serializedProperties;
public IEnumerable<SerializedProperty> SerializedMetaProperties => serializedMetaProperties;
public IEnumerable<AbstractProperty> Properties => properties;
public IEnumerable<AbstractProperty> MetaProperties => metaProperties;
private EditorView editorView;
public CopyPasteData(EditorView editorView, IEnumerable<SerializedNode> nodes, IEnumerable<SerializedEdge> edges, IEnumerable<AbstractProperty> properties, IEnumerable<AbstractProperty> metaProperties) {
this.editorView = editorView;
foreach (var node in nodes) {
AddNode(node);
foreach (var edge in GetAllEdgesForNode(node)) {
AddEdge(edge);
}
}
foreach (var edge in edges) {
AddEdge(edge);
}
foreach (var property in properties) {
AddProperty(property);
}
foreach (var metaProperty in metaProperties) {
AddMetaProperty(metaProperty);
}
}
private void AddNode(SerializedNode node) {
nodes.Add(node);
}
private void AddEdge(SerializedEdge edge) {
edges.Add(edge);
}
private void AddProperty(AbstractProperty property) {
properties.Add(property);
}
private void AddMetaProperty(AbstractProperty property) {
metaProperties.Add(property);
}
public void OnBeforeSerialize() {
serializedNodes = new List<SerializedNode>();
foreach (var node in nodes) {
serializedNodes.Add(node);
}
serializedEdges = new List<SerializedEdge>();
foreach (var edge in edges) {
serializedEdges.Add(edge);
}
serializedProperties = new List<SerializedProperty>();
foreach (var property in properties) {
serializedProperties.Add(new SerializedProperty(property));
}
serializedMetaProperties = new List<SerializedProperty>();
foreach (var property in metaProperties) {
serializedMetaProperties.Add(new SerializedProperty(property));
}
}
public void OnAfterDeserialize() {
nodes = new HashSet<SerializedNode>();
edges = new HashSet<SerializedEdge>();
properties = new HashSet<AbstractProperty>();
metaProperties = new HashSet<AbstractProperty>();
foreach (var node in serializedNodes) {
nodes.Add(node);
}
foreach (var edge in serializedEdges) {
edges.Add(edge);
}
foreach (var prop in serializedProperties) {
properties.Add(prop.Deserialize());
}
foreach (var prop in serializedMetaProperties) {
metaProperties.Add(prop.Deserialize());
}
}
private IEnumerable<SerializedEdge> GetAllEdgesForNode(SerializedNode node) {
var edges = new List<SerializedEdge>();
foreach (var portConnections in node.GuidPortDictionary.Values.Select(port => port.connections)) {
edges.AddRange(portConnections.Select(edge => edge.userData).OfType<SerializedEdge>());
}
return edges;
}
public static CopyPasteData FromJson(string json) {
try {
return JsonUtility.FromJson<CopyPasteData>(json);
} catch {
// ignored. just means json was not a CopyPasteData object
return null;
}
}
}
}
================================================
FILE: Editor/Graph/Data/CopyPasteData.cs.meta
================================================
fileFormatVersion: 2
guid: 59de5bfe57a04708b153166215579951
timeCreated: 1602764627
================================================
FILE: Editor/Graph/Data/DlogGraphData.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
namespace DialogueGraph {
[Serializable]
public class DlogGraphData : ISerializationCallbackReceiver {
public DlogGraphObject Owner { get; set; }
[SerializeField] public string AssetGuid;
[SerializeField] public bool IsBlackboardVisible;
[SerializeField] public string DialogueGraphVersion;
[NonSerialized] private Dictionary<string, SerializedNode> nodeDictionary = new Dictionary<string, SerializedNode>();
[SerializeField] private List<SerializedNode> nodes = new List<SerializedNode>();
[NonSerialized] private List<SerializedNode> addedNodes = new List<SerializedNode>();
[NonSerialized] private List<SerializedNode> removedNodes = new List<SerializedNode>();
[NonSerialized] private List<SerializedNode> pastedNodes = new List<SerializedNode>();
public List<SerializedNode> Nodes => nodes;
public List<SerializedNode> AddedNodes => addedNodes;
public List<SerializedNode> RemovedNodes => removedNodes;
public List<SerializedNode> PastedNodes => pastedNodes;
[SerializeField] private List<SerializedEdge> edges = new List<SerializedEdge>();
[NonSerialized] private List<SerializedEdge> addedEdges = new List<SerializedEdge>();
[NonSerialized] private List<SerializedEdge> removedEdges = new List<SerializedEdge>();
public List<SerializedEdge> Edges => edges;
public List<SerializedEdge> AddedEdges => addedEdges;
public List<SerializedEdge> RemovedEdges => removedEdges;
[NonSerialized] private List<AbstractProperty> properties = new List<AbstractProperty>();
[NonSerialized] private List<AbstractProperty> addedProperties = new List<AbstractProperty>();
[NonSerialized] private List<AbstractProperty> removedProperties = new List<AbstractProperty>();
[NonSerialized] private List<AbstractProperty> movedProperties = new List<AbstractProperty>();
[SerializeField] private List<SerializedProperty> serializedProperties = new List<SerializedProperty>();
public List<AbstractProperty> Properties => properties;
public List<AbstractProperty> AddedProperties => addedProperties;
public List<AbstractProperty> RemovedProperties => removedProperties;
public List<AbstractProperty> MovedProperties => movedProperties;
[NonSerialized] private List<SerializedNode> nodeSelectionQueue = new List<SerializedNode>();
[NonSerialized] private List<SerializedEdge> edgeSelectionQueue = new List<SerializedEdge>();
public List<SerializedNode> NodeSelectionQueue => nodeSelectionQueue;
public List<SerializedEdge> EdgeSelectionQueue => edgeSelectionQueue;
public void OnBeforeSerialize() {
if (Owner != null)
IsBlackboardVisible = Owner.IsBlackboardVisible;
serializedProperties.Clear();
foreach (var property in properties) {
serializedProperties.Add(new SerializedProperty(property));
}
}
public void OnAfterDeserialize() {
nodes.ForEach(node => nodeDictionary.Add(node.GUID, node));
serializedProperties.ForEach(prop => AddProperty(prop.Deserialize()));
}
public void ClearChanges() {
addedNodes.Clear();
removedNodes.Clear();
addedEdges.Clear();
removedEdges.Clear();
addedProperties.Clear();
removedProperties.Clear();
movedProperties.Clear();
nodeSelectionQueue.Clear();
edgeSelectionQueue.Clear();
}
public void ReplaceWith(DlogGraphData otherGraphData) {
// Remove everything
var removedNodesGuid = new List<string>();
removedNodesGuid.AddRange(nodes.Select(node => node.GUID));
foreach (var node in removedNodesGuid) {
RemoveNode(nodeDictionary[node]);
}
var removedProperties = new List<AbstractProperty>(properties);
foreach (var prop in removedProperties)
RemoveProperty(prop);
// Add back everything
foreach (var node in otherGraphData.nodes) {
AddNode(node);
}
foreach (var edge in otherGraphData.edges) {
AddEdge(edge);
}
foreach (var property in otherGraphData.properties) {
AddProperty(property);
}
}
public void AddNode(SerializedNode node) {
nodeDictionary.Add(node.GUID, node);
nodes.Add(node);
addedNodes.Add(node);
}
public void RemoveNode(SerializedNode node) {
if (!nodeDictionary.ContainsKey(node.GUID))
throw new InvalidOperationException($"Cannot remove node ({node.GUID}) because it doesn't exist.");
nodes.Remove(node);
nodeDictionary.Remove(node.GUID);
removedNodes.Add(node);
edges.Where(edge => edge.Input == node.GUID || edge.Output == node.GUID).ToList().ForEach(RemoveEdge);
}
public bool HasEdge(Edge edge) {
var serializedEdge = new SerializedEdge {
Input = edge.input.node.viewDataKey,
Output = edge.output.node.viewDataKey,
InputPort = edge.input.viewDataKey,
OutputPort = edge.output.viewDataKey
};
return Edges.Any(edge1 => edge1.Input == serializedEdge.Input && edge1.Output == serializedEdge.Output && edge1.InputPort == serializedEdge.InputPort && edge1.OutputPort == serializedEdge.OutputPort);
}
public void AddEdge(Edge edge) {
var serializedEdge = new SerializedEdge {
Input = edge.input.node.viewDataKey,
Output = edge.output.node.viewDataKey,
InputPort = edge.input.viewDataKey,
OutputPort = edge.output.viewDataKey,
InputCapacity = edge.input.capacity,
OutputCapacity = edge.output.capacity
};
AddEdge(serializedEdge);
}
public void AddEdge(SerializedEdge edge) {
if (edge.InputCapacity == Port.Capacity.Single) {
// Remove all edges with the same port
var temp = new List<SerializedEdge>();
temp.AddRange(edges.Where(edge1 => edge1.InputPort == edge.InputPort));
temp.ForEach(RemoveEdge);
}
if (edge.OutputCapacity == Port.Capacity.Single) {
// Remove all edges with the same port
var temp = new List<SerializedEdge>();
temp.AddRange(edges.Where(edge1 => edge1.OutputPort == edge.OutputPort));
temp.ForEach(RemoveEdge);
}
edges.Add(edge);
addedEdges.Add(edge);
}
public void RemoveEdge(SerializedEdge edge) {
edges.Remove(edge);
removedEdges.Add(edge);
}
public void AddProperty(AbstractProperty property) {
if (property == null) return;
if (properties.Contains(property)) return;
properties.Add(property);
addedProperties.Add(property);
}
public void RemoveProperty(AbstractProperty property) {
var propertyNodes = nodes.FindAll(node => node.Node is PropertyNode propertyNode && propertyNode.PropertyGuid == property.GUID);
foreach (var node in propertyNodes)
RemoveNode(node);
if (properties.Remove(property)) {
removedProperties.Add(property);
addedProperties.Remove(property);
movedProperties.Remove(property);
}
}
public void MoveProperty(AbstractProperty property, int newIndex) {
if (newIndex > properties.Count || newIndex < 0)
throw new ArgumentException("New index is not within properties list.");
var currentIndex = properties.IndexOf(property);
if (currentIndex == -1)
throw new ArgumentException("Property is not in graph.");
if (newIndex == currentIndex) {
Debug.Log($"New index is the same as current index {newIndex} == {currentIndex}");
return;
}
properties.RemoveAt(currentIndex);
if (newIndex > currentIndex)
newIndex--;
var isLast = newIndex == properties.Count;
if (isLast) {
Debug.Log($"New index is the last index new:{newIndex} current:{currentIndex}");
properties.Add(property);
} else {
Debug.Log($"new:{newIndex} current:{currentIndex}");
properties.Insert(newIndex, property);
}
if (!movedProperties.Contains(property))
movedProperties.Add(property);
}
public void RemoveElements(List<SerializedNode> nodes, List<SerializedEdge> edges) {
foreach (var edge in edges) {
RemoveEdge(edge);
}
foreach (var node in nodes) {
RemoveNode(node);
}
}
public void QueueSelection(List<SerializedNode> nodes, List<SerializedEdge> edges) {
nodeSelectionQueue.AddRange(nodes);
edgeSelectionQueue.AddRange(edges);
}
public void SanitizePropertyName(AbstractProperty property) {
property.DisplayName = property.DisplayName.Trim();
property.DisplayName = DialogueGraphUtility.SanitizeName(properties.Where(prop => prop.GUID != property.GUID).Select(prop => prop.DisplayName), "{0} ({1})", property.DisplayName);
}
public void SanitizePropertyReference(AbstractProperty property, string newReferenceName) {
if (string.IsNullOrEmpty(newReferenceName))
return;
var name = newReferenceName.Trim();
if (string.IsNullOrEmpty(name))
return;
property.OverrideReferenceName = DialogueGraphUtility.SanitizeName(properties.Where(prop => prop.GUID != property.GUID).Select(prop => prop.ReferenceName), "{0} ({1})", name);
}
public void Paste(CopyPasteData copyPasteData, List<SerializedNode> remappedNodes, List<SerializedEdge> remappedEdges) {
var nodeGuidMap = new Dictionary<string, string>();
var portGuidMap = new Dictionary<string, string>();
foreach (var node in copyPasteData.Nodes) {
var oldGuid = node.GUID;
var newGuid = Guid.NewGuid().ToString();
node.GUID = newGuid;
nodeGuidMap[oldGuid] = newGuid;
for (var i = 0; i < node.PortData.Count; i++) {
var newPortGuid = Guid.NewGuid().ToString();
var oldPortGuid = node.PortData[i];
portGuidMap[oldPortGuid] = newPortGuid;
node.PortData[i] = newPortGuid;
}
// Ugly magic to change dynamic port guid data
if (node.Type == typeof(SelfNode).FullName) {
var data = JObject.Parse(node.NodeData);
var lines = JsonConvert.DeserializeObject<List<LineDataSelf>>(data.Value<string>("lines"));
foreach (var currLine in lines) {
currLine.PortGuidA = portGuidMap[currLine.PortGuidA];
currLine.PortGuidB = portGuidMap[currLine.PortGuidB];
}
data["lines"] = new JValue(JsonConvert.SerializeObject(lines));
node.NodeData = data.ToString(Formatting.None);
} else if (node.Type == typeof(NpcNode).FullName) {
var data = JObject.Parse(node.NodeData);
var lines = JsonConvert.DeserializeObject<List<LineDataNpc>>(data.Value<string>("lines"));
foreach (var currLine in lines) {
currLine.PortGuidA = portGuidMap[currLine.PortGuidA];
currLine.PortGuidB = portGuidMap[currLine.PortGuidB];
currLine.PortGuidC = portGuidMap[currLine.PortGuidC];
}
data["lines"] = new JValue(JsonConvert.SerializeObject(lines));
node.NodeData = data.ToString(Formatting.None);
}
// offset the pasted node slightly so it's not on top of the original one
var drawState = node.DrawState;
var position = drawState.Position;
position.x += 30;
position.y += 30;
drawState.Position = position;
node.DrawState = drawState;
remappedNodes.Add(node);
AddNode(node);
// add the node to the pasted node list
pastedNodes.Add(node);
}
foreach (var edge in copyPasteData.Edges) {
if ((nodeGuidMap.ContainsKey(edge.Input) && nodeGuidMap.ContainsKey(edge.Output)) && (portGuidMap.ContainsKey(edge.InputPort) && portGuidMap.ContainsKey(edge.OutputPort))) {
var remappedOutputGuid = nodeGuidMap.ContainsKey(edge.Output) ? nodeGuidMap[edge.Output] : edge.Output;
var remappedInputGuid = nodeGuidMap.ContainsKey(edge.Input) ? nodeGuidMap[edge.Input] : edge.Input;
var remappedOutputPortGuid = portGuidMap.ContainsKey(edge.OutputPort) ? portGuidMap[edge.OutputPort] : edge.OutputPort;
var remappedInputPortGuid = portGuidMap.ContainsKey(edge.InputPort) ? portGuidMap[edge.InputPort] : edge.InputPort;
var remappedEdge = new SerializedEdge {
Input = remappedInputGuid,
Output = remappedOutputGuid,
InputPort = remappedInputPortGuid,
OutputPort = remappedOutputPortGuid,
InputCapacity = edge.InputCapacity,
OutputCapacity = edge.OutputCapacity
};
remappedEdges.Add(remappedEdge);
AddEdge(remappedEdge);
}
}
}
}
}
================================================
FILE: Editor/Graph/Data/DlogGraphData.cs.meta
================================================
fileFormatVersion: 2
guid: c191dd86e9a94d78baaeb54ed76b3022
timeCreated: 1601289631
================================================
FILE: Editor/Graph/Data/DlogGraphObject.cs
================================================
using System;
using UnityEditor;
using UnityEngine;
namespace DialogueGraph {
public class DlogGraphObject : ScriptableObject, ISerializationCallbackReceiver {
[NonSerialized] private DlogGraphData dlogGraph;
[NonSerialized] private int objectVersion;
[SerializeField] public string AssetGuid;
[SerializeField] public bool IsBlackboardVisible;
[SerializeField] private string serializedGraph;
[SerializeField] private int fileVersion;
[SerializeField] private bool isDirty;
public DlogGraphData DlogGraph {
get => dlogGraph;
set {
dlogGraph = value;
if (dlogGraph != null)
dlogGraph.Owner = this;
}
}
public void Initialize(DlogGraphData dlogData) {
DlogGraph = dlogData;
IsBlackboardVisible = DlogGraph.IsBlackboardVisible;
}
public bool IsDirty {
get => isDirty;
set => isDirty = value;
}
public bool WasUndoRedoPerformed => objectVersion != fileVersion;
public void RegisterCompleteObjectUndo(string name) {
Undo.RegisterCompleteObjectUndo(this, name);
fileVersion++;
objectVersion++;
isDirty = true;
}
public void OnBeforeSerialize() {
if(dlogGraph == null) return;
serializedGraph = JsonUtility.ToJson(dlogGraph, true);
AssetGuid = dlogGraph.AssetGuid;
}
public void OnAfterDeserialize() {
if(DlogGraph != null) return;
DlogGraph = Deserialize();
}
public void HandleUndoRedo() {
if (!WasUndoRedoPerformed) {
Debug.LogError("Trying to handle undo/redo when undo/redo was not performed", this);
return;
}
var deserialized = Deserialize();
dlogGraph.ReplaceWith(deserialized);
// Undo.PerformUndo();
}
private DlogGraphData Deserialize() {
var deserialized = JsonUtility.FromJson<DlogGraphData>(serializedGraph);
deserialized.AssetGuid = AssetGuid;
objectVersion = fileVersion;
serializedGraph = "";
return deserialized;
}
public void RecalculateAssetGuid(string assetPath) {
AssetGuid = AssetDatabase.AssetPathToGUID(assetPath);
dlogGraph.AssetGuid = AssetGuid;
}
}
}
================================================
FILE: Editor/Graph/Data/DlogGraphObject.cs.meta
================================================
fileFormatVersion: 2
guid: 45a52db35d93407fb259c4996ec53fa6
timeCreated: 1601289640
================================================
FILE: Editor/Graph/Data/NodeDrawState.cs
================================================
using System;
using UnityEngine;
namespace DialogueGraph {
[Serializable]
public struct NodeDrawState {
[SerializeField] public Rect Position;
[SerializeField] public bool Expanded;
}
}
================================================
FILE: Editor/Graph/Data/NodeDrawState.cs.meta
================================================
fileFormatVersion: 2
guid: 76290e77b5a74b6ba5d52be0d2aaa0ef
timeCreated: 1601551907
================================================
FILE: Editor/Graph/Data/Properties/AbstractProperty.cs
================================================
using System;
using DialogueGraph.Runtime;
using UnityEngine;
namespace DialogueGraph {
[Serializable]
public abstract class AbstractProperty {
[SerializeField] public string GUID = Guid.NewGuid().ToString();
[SerializeField] public PropertyType Type;
[SerializeField] private string name;
[SerializeField] private string defaultReferenceName;
[SerializeField] private string overrideReferenceName;
[SerializeField] private bool hidden;
public string DisplayName {
get {
if (string.IsNullOrEmpty(name))
return $"{Type}_{ShortGuid}";
return name;
}
set => name = value;
}
public string ReferenceName {
get {
if (string.IsNullOrEmpty(OverrideReferenceName)) {
if (string.IsNullOrEmpty(defaultReferenceName))
defaultReferenceName = GetDefaultReferenceName();
return defaultReferenceName;
}
return OverrideReferenceName;
}
}
public string OverrideReferenceName {
get => overrideReferenceName;
set => overrideReferenceName = value;
}
public bool Hidden {
get => hidden;
set => hidden = value;
}
public virtual string GetDefaultReferenceName() {
return $"{Type}_{ShortGuid}";
}
public string ShortGuid {
get {
if (string.IsNullOrEmpty(GUID))
GUID = Guid.NewGuid().ToString();
if (Guid.TryParse(GUID, out var parsedGuid))
return $"{Convert.ToBase64String(parsedGuid.ToByteArray()).GetHashCode():X}";
return $"{Convert.ToBase64String(Guid.NewGuid().ToByteArray()).GetHashCode():X}";
}
}
public abstract AbstractProperty Copy();
}
[Serializable]
public abstract class AbstractProperty<T> : AbstractProperty {
private T value;
public T Value {
get => value;
set => this.value = value;
}
}
}
================================================
FILE: Editor/Graph/Data/Properties/AbstractProperty.cs.meta
================================================
fileFormatVersion: 2
guid: 8b7821e2c03c442f8979d30247900abe
timeCreated: 1602590130
================================================
FILE: Editor/Graph/Data/Properties/ActorProperty.cs
================================================
using System;
using DialogueGraph.Runtime;
using UnityEngine;
namespace DialogueGraph {
[Serializable]
public class ActorProperty : AbstractProperty {
public ActorProperty() {
DisplayName = "Actor";
Type = PropertyType.Actor;
}
public override AbstractProperty Copy() {
return new ActorProperty {
DisplayName = DisplayName,
Hidden = Hidden
};
}
}
}
================================================
FILE: Editor/Graph/Data/Properties/ActorProperty.cs.meta
================================================
fileFormatVersion: 2
guid: b1714ccfa2d94454bad768ada07829b1
timeCreated: 1602591421
================================================
FILE: Editor/Graph/Data/Properties/CheckProperty.cs
================================================
using System;
using DialogueGraph.Runtime;
namespace DialogueGraph {
[Serializable]
public class CheckProperty : AbstractProperty {
public CheckProperty() {
DisplayName = "Check";
Type = PropertyType.Check;
}
public override AbstractProperty Copy() {
return new CheckProperty {
DisplayName = DisplayName,
Hidden = Hidden
};
}
}
}
================================================
FILE: Editor/Graph/Data/Properties/CheckProperty.cs.meta
================================================
fileFormatVersion: 2
guid: 791df7817718417b8d85ff456275f787
timeCreated: 1602591348
================================================
FILE: Editor/Graph/Data/Properties/TriggerProperty.cs
================================================
using System;
using DialogueGraph.Runtime;
namespace DialogueGraph {
[Serializable]
public class TriggerProperty : AbstractProperty {
public TriggerProperty() {
DisplayName = "Trigger";
Type = PropertyType.Trigger;
}
public override AbstractProperty Copy() {
return new TriggerProperty {
DisplayName = DisplayName,
Hidden = Hidden
};
}
}
}
================================================
FILE: Editor/Graph/Data/Properties/TriggerProperty.cs.meta
================================================
fileFormatVersion: 2
guid: b4055b2efff2408cbc7af168eedbc563
timeCreated: 1602590953
================================================
FILE: Editor/Graph/Data/Properties.meta
================================================
fileFormatVersion: 2
guid: f28d6edcc2e74cfc9d314ba343872167
timeCreated: 1602590819
================================================
FILE: Editor/Graph/Data/SerializedEdge.cs
================================================
using System;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using Edge = UnityEditor.Experimental.GraphView.Edge;
namespace DialogueGraph {
[Serializable]
public class SerializedEdge {
[SerializeField] public string Input;
[SerializeField] public string Output;
[SerializeField] public string InputPort;
[SerializeField] public string OutputPort;
public Port.Capacity InputCapacity;
public Port.Capacity OutputCapacity;
public Edge Edge;
public EditorView EditorView;
public void BuildEdge(EditorView editorView) {
EditorView = editorView;
var inputNode = editorView.GraphView.nodes.ToList().Find(node => node.viewDataKey == Input) as AbstractNode;
var outputNode = editorView.GraphView.nodes.ToList().Find(node => node.viewDataKey == Output) as AbstractNode;
var inputPort = inputNode.Owner.GuidPortDictionary[InputPort];
var outputPort = outputNode.Owner.GuidPortDictionary[OutputPort];
Edge = inputPort.ConnectTo(outputPort);
Edge.userData = this;
}
}
}
================================================
FILE: Editor/Graph/Data/SerializedEdge.cs.meta
================================================
fileFormatVersion: 2
guid: 647548daa8934a929f8e14371c0705df
timeCreated: 1601479470
================================================
FILE: Editor/Graph/Data/SerializedNode.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
namespace DialogueGraph {
[Serializable]
public class SerializedNode : ISerializationCallbackReceiver {
[SerializeField] public string GUID;
[SerializeField] public string Type;
[SerializeField] public NodeDrawState DrawState;
[SerializeField] public string NodeData;
[SerializeField] public List<string> PortData;
[NonSerialized] public Dictionary<string, Port> GuidPortDictionary;
public EditorView EditorView;
public AbstractNode Node;
public SerializedNode(Type type, Rect position) {
Type = type.FullName;
DrawState.Position = position;
DrawState.Expanded = true;
GUID = Guid.NewGuid().ToString();
}
public void BuildNode(EditorView editorView, EdgeConnectorListener edgeConnectorListener, bool buildPortData = true) {
EditorView = editorView;
Node = (AbstractNode) Activator.CreateInstance(System.Type.GetType(Type));
Node.InitializeNode(edgeConnectorListener);
Node.GUID = GUID;
Node.viewDataKey = GUID;
Node.Owner = this;
Node.SetExpandedWithoutNotify(DrawState.Expanded);
Node.SetPosition(DrawState.Position);
if (!string.IsNullOrEmpty(NodeData))
Node.SetNodeData(NodeData);
Node.Refresh();
if (buildPortData)
BuildPortData();
}
public void BuildPortData() {
if ((Node.Ports == null || Node.Ports.Count == 0) && (PortData == null || PortData.Count == 0)) {
return;
}
if ((PortData == null || PortData.Count == 0) && Node.Ports.Count != 0 || (PortData != null && PortData.Count != Node.Ports.Count && Node.Ports.Count != 0)) {
// GET
PortData = new List<string>();
foreach (var port in Node.Ports) {
PortData.Add(port.viewDataKey);
}
} else {
// SET
if (PortData == null)
throw new InvalidDataException("Serialized port data somehow ended up as null when it was not supposed to.");
for (var i = 0; i < PortData.Count; i++) {
Node.Ports[i].viewDataKey = PortData[i];
}
}
// Build dictionary
GuidPortDictionary = new Dictionary<string, Port>();
foreach (var port in Node.Ports) {
GuidPortDictionary.Add(port.viewDataKey, port);
}
}
public void OnBeforeSerialize() {
if (Node == null)
return;
Node.OnNodeSerialized();
NodeData = Node.GetNodeData();
}
public void OnAfterDeserialize() {
if (Node == null)
return;
Node.OnNodeDeserialized();
if (!string.IsNullOrEmpty(NodeData))
Node.SetNodeData(NodeData);
}
}
}
================================================
FILE: Editor/Graph/Data/SerializedNode.cs.meta
================================================
fileFormatVersion: 2
guid: 7a13f7ce51ca435792839c6342944c7d
timeCreated: 1601479420
================================================
FILE: Editor/Graph/Data/SerializedProperty.cs
================================================
using System;
using Newtonsoft.Json;
namespace DialogueGraph {
[Serializable]
public class SerializedProperty {
public string Type;
public string Data;
public SerializedProperty(AbstractProperty property) {
Data = JsonConvert.SerializeObject(property, Formatting.None, new JsonSerializerSettings {TypeNameHandling = TypeNameHandling.All});
Type = property.GetType().FullName;
}
}
}
================================================
FILE: Editor/Graph/Data/SerializedProperty.cs.meta
================================================
fileFormatVersion: 2
guid: 851b6a27fb244793a696f96b78ccf017
timeCreated: 1602600670
================================================
FILE: Editor/Graph/Data/VersionMismatchObject.cs
================================================
using UnityEngine;
namespace DialogueGraph {
internal class VersionMismatchObject : ScriptableObject {
}
}
================================================
FILE: Editor/Graph/Data/VersionMismatchObject.cs.meta
================================================
fileFormatVersion: 2
guid: 15c4241bdbc14e7e9ac2eabe65b9b4b7
timeCreated: 1649591459
================================================
FILE: Editor/Graph/Data.meta
================================================
fileFormatVersion: 2
guid: dd017a28da8740f881573ba039014b54
timeCreated: 1601480300
================================================
FILE: Editor/Graph/Nodes/AbstractNode.cs
================================================
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using UnityEngine.UIElements;
namespace DialogueGraph {
public abstract class AbstractNode : Node {
public SerializedNode Owner { get; set; }
public string GUID;
public readonly List<Port> Ports = new List<Port>();
protected EdgeConnectorListener EdgeConnectorListener;
public override bool expanded {
get => base.expanded;
set {
Owner.EditorView.DlogObject.RegisterCompleteObjectUndo("Expanded state changed");
base.expanded = value;
Owner.DrawState.Expanded = value;
}
}
// ReSharper disable once InconsistentNaming, UnusedAutoPropertyAccessor.Local
[Obsolete("Use AddPort instead of manually adding ports to the container. Only use this if you're adding custom items to the container.", false)]
protected new VisualElement inputContainer => base.inputContainer;
// ReSharper disable once InconsistentNaming, UnusedAutoPropertyAccessor.Local
[Obsolete("Use AddPort instead of manually adding ports to the container. Only use this if you're adding custom items to the container.", false)]
protected new VisualElement outputContainer => base.outputContainer;
protected void AddPort(Port port, bool alsoAddToHierarchy = true) {
Ports.Add(port);
if(!alsoAddToHierarchy) return;
var isInput = port.direction == Direction.Input;
if (isInput) {
base.inputContainer.Add(port);
} else {
base.outputContainer.Add(port);
}
}
public virtual void InitializeNode(EdgeConnectorListener edgeConnectorListener) {
EdgeConnectorListener = edgeConnectorListener;
}
protected void Initialize(string nodeTitle, Rect nodePosition) {
base.title = nodeTitle;
base.SetPosition(nodePosition);
GUID = Guid.NewGuid().ToString();
viewDataKey = GUID;
this.AddStyleSheet("Styles/Node/Node");
InjectCustomStyle();
}
protected virtual void InjectCustomStyle() {
var border = this.Q("node-border");
var overflowStyle = border.style.overflow;
overflowStyle.value = Overflow.Visible;
border.style.overflow = overflowStyle;
var selectionBorder = this.Q("selection-border");
selectionBorder.SendToBack();
}
public void Refresh() {
RefreshPorts();
RefreshExpandedState();
}
public void SetExpandedWithoutNotify(bool value) {
base.expanded = value;
}
public virtual void SetNodeData(string jsonData) { }
public virtual string GetNodeData() {
var root = new JObject();
return root.ToString(Formatting.None);
}
public virtual void OnNodeSerialized() { }
public virtual void OnNodeDeserialized() { }
}
}
================================================
FILE: Editor/Graph/Nodes/AbstractNode.cs.meta
================================================
fileFormatVersion: 2
guid: eb86560c1bb04cc997a78be15a95ac6e
timeCreated: 1601474268
================================================
FILE: Editor/Graph/Nodes/Boolean/BinaryBooleanNode.cs
================================================
using UnityEditor.Experimental.GraphView;
using UnityEngine.UIElements;
namespace DialogueGraph {
public abstract class BinaryBooleanNode : AbstractNode {
protected abstract string Title { get; }
protected abstract BooleanOperation Operation { get; }
public override void InitializeNode(EdgeConnectorListener edgeConnectorListener) {
base.InitializeNode(edgeConnectorListener);
Initialize(Title, EditorView.DefaultNodePosition);
this.AddStyleSheet("Styles/Node/BooleanNode");
AddToClassList(Operation.ToString());
DlogPort inA = DlogPort.Create("INA", Orientation.Horizontal, Direction.Input, Port.Capacity.Single, PortType.Boolean, true, edgeConnectorListener, true);
DlogPort inB = DlogPort.Create("INB", Orientation.Horizontal, Direction.Input, Port.Capacity.Single, PortType.Boolean, true, edgeConnectorListener, true);
DlogPort @out = DlogPort.Create("OUT", Orientation.Horizontal, Direction.Output, Port.Capacity.Single, PortType.Boolean, true, edgeConnectorListener, true);
AddPort(inA, false);
AddPort(inB, false);
AddPort(@out, false);
VisualElement booleanMain = UIElementsFactory.VisualElement<VisualElement>("boolean-main", null);
VisualElement booleanInput = UIElementsFactory.VisualElement<VisualElement>("boolean-input", new[] {"boolean-column"});
VisualElement booleanOutput = UIElementsFactory.VisualElement<VisualElement>("boolean-output", new[] {"boolean-column"});
booleanMain.Add(booleanInput);
booleanMain.Add(UIElementsFactory.TextElement<Label>("boolean-operation", Operation.ToString(), new[] {"boolean-column"}));
booleanMain.Add(booleanOutput);
booleanInput.Add(inA);
booleanInput.Add(inB);
booleanOutput.Add(@out);
titleContainer.Clear();
titleContainer.Add(booleanMain);
Refresh();
}
}
}
================================================
FILE: Editor/Graph/Nodes/Boolean/BinaryBooleanNode.cs.meta
================================================
fileFormatVersion: 2
guid: 2d98f66e26a848fc9816693d42cacd53
timeCreated: 1649584538
================================================
FILE: Editor/Graph/Nodes/Boolean/BooleanNodes.cs
================================================
namespace DialogueGraph {
[Title("Boolean", "NOT")]
public class NotBooleanNode : UnaryBooleanNode {
protected override string Title => "Not/Negate";
protected override BooleanOperation Operation => BooleanOperation.NOT;
}
[Title("Boolean", "AND")]
public class AndBooleanNode : BinaryBooleanNode {
protected override string Title => "And";
protected override BooleanOperation Operation => BooleanOperation.AND;
}
[Title("Boolean", "OR")]
public class OrBooleanNode : BinaryBooleanNode {
protected override string Title => "Or";
protected override BooleanOperation Operation => BooleanOperation.OR;
}
[Title("Boolean", "XOR")]
public class XorBooleanNode : BinaryBooleanNode {
protected override string Title => "Xor";
protected override BooleanOperation Operation => BooleanOperation.XOR;
}
[Title("Boolean", "NAND")]
public class NandBooleanNode : BinaryBooleanNode {
protected override string Title => "Nand";
protected override BooleanOperation Operation => BooleanOperation.NAND;
}
[Title("Boolean", "NOR")]
public class NorBooleanNode : BinaryBooleanNode {
protected override string Title => "Nor";
protected override BooleanOperation Operation => BooleanOperation.NOR;
}
[Title("Boolean", "XNOR")]
public class XnorBooleanNode : BinaryBooleanNode {
protected override string Title => "Xnor";
protected override BooleanOperation Operation => BooleanOperation.XNOR;
}
}
================================================
FILE: Editor/Graph/Nodes/Boolean/BooleanNodes.cs.meta
================================================
fileFormatVersion: 2
guid: 7dc49fe917b6428e91e2a2d58287cd04
timeCreated: 1649584579
================================================
FILE: Editor/Graph/Nodes/Boolean/UnaryBooleanNode.cs
================================================
using UnityEditor.Experimental.GraphView;
using UnityEngine.UIElements;
namespace DialogueGraph {
public abstract class UnaryBooleanNode : AbstractNode {
protected abstract string Title { get; }
protected abstract BooleanOperation Operation { get; }
public override void InitializeNode(EdgeConnectorListener edgeConnectorListener) {
base.InitializeNode(edgeConnectorListener);
Initialize(Title, EditorView.DefaultNodePosition);
this.AddStyleSheet("Styles/Node/BooleanNode");
AddToClassList(Operation.ToString());
DlogPort @in = DlogPort.Create("IN", Orientation.Horizontal, Direction.Input, Port.Capacity.Single, PortType.Boolean, true, edgeConnectorListener, true);
DlogPort @out = DlogPort.Create("OUT", Orientation.Horizontal, Direction.Output, Port.Capacity.Single, PortType.Boolean, true, edgeConnectorListener, true);
AddPort(@in, false);
AddPort(@out, false);
VisualElement booleanMain = UIElementsFactory.VisualElement<VisualElement>("boolean-main", null);
VisualElement booleanInput = UIElementsFactory.VisualElement<VisualElement>("boolean-input", new[] {"boolean-column"});
VisualElement booleanOutput = UIElementsFactory.VisualElement<VisualElement>("boolean-output", new[] {"boolean-column"});
booleanMain.Add(booleanInput);
booleanMain.Add(UIElementsFactory.TextElement<Label>("boolean-operation", Operation.ToString(), new[] {"boolean-column"}));
booleanMain.Add(booleanOutput);
booleanInput.Add(@in);
booleanOutput.Add(@out);
titleContainer.Clear();
titleContainer.Add(booleanMain);
Refresh();
}
}
}
================================================
FILE: Editor/Graph/Nodes/Boolean/UnaryBooleanNode.cs.meta
================================================
fileFormatVersion: 2
guid: 92835ae44e17474d9f9464a90008dfb0
timeCreated: 1649583997
================================================
FILE: Editor/Graph/Nodes/Boolean.meta
================================================
fileFormatVersion: 2
guid: 8f497a2553e74f8abd283933c4697b1f
timeCreated: 1649583978
================================================
FILE: Editor/Graph/Nodes/NodeColors.cs
================================================
using UnityEngine;
namespace DialogueGraph {
public static class NodeColors {
public static Color CombinerColor = new Color(0.19f, 0.65f, 0.71f);
}
}
================================================
FILE: Editor/Graph/Nodes/NodeColors.cs.meta
================================================
fileFormatVersion: 2
guid: 5738c2748b044563868f33194c81519f
timeCreated: 1605351105
================================================
FILE: Editor/Graph/Nodes/NpcNode.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEditor;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using UnityEngine.UIElements;
#pragma warning disable 618
namespace DialogueGraph {
public class LineDataNpc {
public string Line;
public string PortGuidA;
public string PortGuidB;
public string PortGuidC;
}
[Title("NPC")]
public class NpcNode : AbstractNode {
public List<LineDataNpc> Lines = new List<LineDataNpc>();
private VisualElement lineLabel;
public override void InitializeNode(EdgeConnectorListener edgeConnectorListener) {
base.InitializeNode(edgeConnectorListener);
Initialize("NPC", EditorView.DefaultNodePosition);
var button = new Button(() => AddConversationPort(true)) {text = "Create Dialogue Line"};
extensionContainer.Add(button);
var titleLabel = this.Q<Label>("title-label");
var titleElement = this.Q("title");
var titleC = UIElementsFactory.VisualElement<VisualElement>("title-container", null);
titleLabel.RemoveFromHierarchy();
titleC.Add(titleLabel);
titleElement.Insert(0, titleC);
lineLabel = new Label {name = "lineTitle", text = "Lines"};
outputContainer.Add(lineLabel);
var titlePortContainer = UIElementsFactory.VisualElement<VisualElement>("npc-title-port-container", null);
var branchPort = DlogPort.Create("Branch", Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, PortType.Branch, true, edgeConnectorListener);
var actorPort = DlogPort.Create("Actor", Orientation.Horizontal, Direction.Input, Port.Capacity.Single, PortType.Actor, true, edgeConnectorListener);
titlePortContainer.Add(branchPort);
titlePortContainer.Add(actorPort);
titleC.Insert(0, titlePortContainer);
AddPort(branchPort, false);
AddPort(actorPort, false);
Refresh();
}
public override void SetNodeData(string jsonData) {
if (string.IsNullOrEmpty(jsonData)) return;
base.SetNodeData(jsonData);
var data = JObject.Parse(jsonData);
var lines = JsonConvert.DeserializeObject<List<LineDataNpc>>(data.Value<string>("lines"));
Lines.Clear();
Lines.AddRange(lines);
for (int i = 0; i < Lines.Count; i++) {
AddConversationPort(false, i);
}
}
public override string GetNodeData() {
var root = new JObject();
root["lines"] = new JValue(JsonConvert.SerializeObject(Lines));
root.Merge(JObject.Parse(base.GetNodeData()));
return root.ToString(Formatting.None);
}
private void AddConversationPort(bool create, int index = -1) {
lineLabel.AddToClassList("visible");
var conversationContainer = new VisualElement {name = "conversation-container"};
if (create) {
Owner.EditorView.DlogObject.RegisterCompleteObjectUndo("Created Dialogue Line");
index = Lines.Count;
Lines.Add(new LineDataNpc {Line = ""});
}
var message = UIElementsFactory.TextField("conversation-item", "Line", new[] {"message"}, null, null, true);
if (!create) {
message.SetValueWithoutNotify(Lines[index].Line);
}
var branchPort = DlogPort.Create("Branch", Orientation.Horizontal, Direction.Output, Port.Capacity.Single, PortType.Branch, true, EdgeConnectorListener);
branchPort.name = "conversation-item";
branchPort.AddToClassList("branch-port");
var triggerPort = DlogPort.Create("Trigger", Orientation.Horizontal, Direction.Output, Port.Capacity.Multi, PortType.Trigger, false, EdgeConnectorListener);
triggerPort.name = "conversation-item";
triggerPort.AddToClassList("trigger-port");
var checkPort = DlogPort.Create("Check", Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, PortType.Check , false,EdgeConnectorListener);
checkPort.name = "conversation-item";
checkPort.AddToClassList("check-port");
var flexBreak = UIElementsFactory.FlexBreaker();
if (create) {
Lines[index].PortGuidA = branchPort.viewDataKey;
Lines[index].PortGuidB = triggerPort.viewDataKey;
Lines[index].PortGuidC = checkPort.viewDataKey;
} else {
branchPort.viewDataKey = Lines[index].PortGuidA;
triggerPort.viewDataKey = Lines[index].PortGuidB;
checkPort.viewDataKey = Lines[index].PortGuidC;
}
message.RegisterCallback<FocusOutEvent>(evt => {
var lineIndex = Lines.FindIndex(data => data.PortGuidA == branchPort.viewDataKey);
if (message.value != Lines[lineIndex].Line) {
Owner.EditorView.DlogObject.RegisterCompleteObjectUndo("Changed Dialogue Line");
Lines[lineIndex].Line = message.value;
}
});
var removeButton = UIElementsFactory.Button("x", "conversation-item", "Remove line", new[] {"remove-button"}, () => { RemoveLine(Lines.FindIndex(data => data.PortGuidA == branchPort.viewDataKey)); });
conversationContainer.Add(message);
conversationContainer.Add(branchPort);
conversationContainer.Add(flexBreak);
conversationContainer.Add(checkPort);
conversationContainer.Add(removeButton);
conversationContainer.Add(triggerPort);
var separator = new VisualElement {name = "divider"};
separator.AddToClassList("horizontal");
separator.AddToClassList("horizontal-divider");
outputContainer.Add(separator);
outputContainer.Add(conversationContainer);
Ports.Add(branchPort);
Ports.Add(triggerPort);
Ports.Add(checkPort);
if (create) {
Owner.PortData.Add(branchPort.viewDataKey);
Owner.PortData.Add(triggerPort.viewDataKey);
Owner.PortData.Add(checkPort.viewDataKey);
Owner.GuidPortDictionary.Add(branchPort.viewDataKey, branchPort);
Owner.GuidPortDictionary.Add(triggerPort.viewDataKey, triggerPort);
Owner.GuidPortDictionary.Add(checkPort.viewDataKey, checkPort);
}
Refresh();
}
private void RemoveLine(int index) {
if (Lines.Count == 1)
lineLabel.RemoveFromClassList("visible");
var container = outputContainer.Children().Where(element => element.name == "conversation-container").ToList()[index];
var separator = outputContainer.Children().Where(element => element.name == "divider" && element.ClassListContains("horizontal-divider")).ToList()[index];
outputContainer.Remove(separator);
Owner.EditorView.DlogObject.RegisterCompleteObjectUndo("Removed Line");
var edgesToRemove = Owner.EditorView.DlogObject.DlogGraph.Edges.Where(edge => edge.InputPort == Lines[index].PortGuidA || edge.OutputPort == Lines[index].PortGuidA).ToList();
edgesToRemove.AddRange(Owner.EditorView.DlogObject.DlogGraph.Edges.Where(edge => edge.InputPort == Lines[index].PortGuidB || edge.OutputPort == Lines[index].PortGuidB));
edgesToRemove.AddRange(Owner.EditorView.DlogObject.DlogGraph.Edges.Where(edge => edge.InputPort == Lines[index].PortGuidC || edge.OutputPort == Lines[index].PortGuidC));
Owner.EditorView.DlogObject.DlogGraph.RemoveElements(new List<SerializedNode>(), edgesToRemove);
Owner.PortData.Remove(Lines[index].PortGuidA);
Owner.PortData.Remove(Lines[index].PortGuidB);
Owner.PortData.Remove(Lines[index].PortGuidC);
var portA = Owner.GuidPortDictionary[Lines[index].PortGuidA];
var portB = Owner.GuidPortDictionary[Lines[index].PortGuidB];
var portC = Owner.GuidPortDictionary[Lines[index].PortGuidC];
Owner.GuidPortDictionary.Remove(Lines[index].PortGuidA);
Owner.GuidPortDictionary.Remove(Lines[index].PortGuidB);
Owner.GuidPortDictionary.Remove(Lines[index].PortGuidC);
Ports.Remove(portA);
Ports.Remove(portB);
Ports.Remove(portC);
Lines.RemoveAt(index);
outputContainer.Remove(container);
Refresh();
}
}
}
================================================
FILE: Editor/Graph/Nodes/NpcNode.cs.meta
================================================
fileFormatVersion: 2
guid: b568e3d4a5e943318ef80702f8618ac4
timeCreated: 1602757776
================================================
FILE: Editor/Graph/Nodes/Port/DlogPort.cs
================================================
using System;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using UnityEngine.UIElements;
namespace DialogueGraph {
public class DlogPort : Port {
public PortType Type { get; private set; }
private DlogPort(Orientation portOrientation, Direction portDirection, Capacity portCapacity) : base(portOrientation, portDirection, portCapacity, typeof(object)) { }
public static DlogPort Create(string name, Orientation portOrientation, Direction portDirection, Capacity portCapacity, PortType type, bool required, EdgeConnectorListener edgeConnectorListener, bool hideLabel = false) {
var port = new DlogPort(portOrientation, portDirection, portCapacity);
if (edgeConnectorListener != null) {
port.m_EdgeConnector = new EdgeConnector<Edge>(edgeConnectorListener);
port.AddManipulator(port.m_EdgeConnector);
}
port.AddStyleSheet("Styles/Node/Port");
if (!required) {
port.AddToClassList("optional");
}
port.Type = type;
port.portColor = PortHelper.PortColor(port);
port.viewDataKey = Guid.NewGuid().ToString();
port.portName = name;
if (hideLabel) {
var label = port.Q<Label>();
var fs = label.style.fontSize;
fs.value = -1;
label.style.fontSize = fs;
var color = label.style.color;
color.value = Color.clear;
label.style.color = color;
}
port.InjectCustomStyle();
return port;
}
}
}
================================================
FILE: Editor/Graph/Nodes/Port/DlogPort.cs.meta
================================================
fileFormatVersion: 2
guid: 0e8d2ea4b7c44d64abb892732dda440d
timeCreated: 1601566487
================================================
FILE: Editor/Graph/Nodes/Port/PortHelper.cs
================================================
using System;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using UnityEngine.UIElements;
namespace DialogueGraph {
public static class PortHelper {
public static bool IsCompatibleWith(this DlogPort port, DlogPort other) {
if (other.Type == PortType.Fake || port.Type == PortType.Fake) return true;
switch (port.Type) {
case PortType.Check:
return other.Type == PortType.Check || other.Type == PortType.Boolean;
case PortType.Trigger:
return other.Type == PortType.Trigger;
case PortType.Actor:
return other.Type == PortType.Actor;
case PortType.Branch:
return other.Type == PortType.Branch;
case PortType.Boolean:
return other.Type == PortType.Check || other.Type == PortType.Boolean;
default:
throw new ArgumentOutOfRangeException();
}
}
public static Color PortColor(DlogPort port) {
switch (port.Type) {
case PortType.Check:
if (port.direction == Direction.Input)
return new Color(0.2f, 0.73f, 1f);
return new Color(0.5f, 0.98f, 1f);
case PortType.Trigger:
if (port.direction == Direction.Input)
return new Color(1f, 0.15f, 0.26f);
return new Color(0.84f, 0.26f, 0.16f);
case PortType.Actor:
if (port.direction == Direction.Input)
return new Color(0.55f, 1f, 0.3f);
return new Color(0.75f, 1f, 0.36f);
case PortType.Branch:
if (port.direction == Direction.Input)
return new Color(0.9f, 1f, 0.99f);
return new Color(0.91f, 0.93f, 1f);
case PortType.Boolean:
if (port.direction == Direction.Input)
return new Color(0.45f, 0.25f, 1f);
return new Color(0.45f, 0.25f, 1f);
case PortType.Fake:
return Color.clear;
default:
throw new ArgumentOutOfRangeException(nameof(port), port, "Undefined color for port type.");
}
}
}
}
================================================
FILE: Editor/Graph/Nodes/Port/PortHelper.cs.meta
================================================
fileFormatVersion: 2
guid: 12906347bd6648799640a8de67e215e2
timeCreated: 1602761086
================================================
FILE: Editor/Graph/Nodes/Port/PortType.cs
================================================
using System;
namespace DialogueGraph {
public enum PortType {
Check,
Trigger,
Actor,
Branch,
Boolean,
Fake
}
}
================================================
FILE: Editor/Graph/Nodes/Port/PortType.cs.meta
================================================
fileFormatVersion: 2
guid: 103e6d5a4c304e70b966ab3606a720da
timeCreated: 1602760423
================================================
FILE: Editor/Graph/Nodes/Port.meta
================================================
fileFormatVersion: 2
guid: c72845a71ace4f8d9317f5fe221cccdf
timeCreated: 1602761062
================================================
FILE: Editor/Graph/Nodes/PropertyNode.cs
================================================
using System;
using System.Linq;
using DialogueGraph.Runtime;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEditor.Experimental.GraphView;
namespace DialogueGraph {
public class PropertyNode : AbstractNode {
private string propertyGuid;
private string currentType;
private EdgeConnectorListener edgeConnectorListener;
public string PropertyGuid {
get => propertyGuid;
set {
if (propertyGuid == value) return;
propertyGuid = value;
var property = Owner.EditorView.DlogObject.DlogGraph.Properties.FirstOrDefault(prop => prop.GUID == value);
if (property == null) return;
if(!string.IsNullOrEmpty(currentType))
RemoveFromClassList(currentType);
currentType = property.Type.ToString();
AddToClassList(currentType);
CreatePorts(property);
}
}
public override void InitializeNode(EdgeConnectorListener edgeConnectorListener) {
Initialize("", EditorView.DefaultNodePosition);
this.edgeConnectorListener = edgeConnectorListener;
Refresh();
}
public override string GetNodeData() {
var root = new JObject();
root["propertyGuid"] = propertyGuid;
root.Merge(JObject.Parse(base.GetNodeData()));
return root.ToString(Formatting.None);
}
public override void SetNodeData(string jsonData) {
if(string.IsNullOrEmpty(jsonData)) return;
base.SetNodeData(jsonData);
var root = JObject.Parse(jsonData);
PropertyGuid = root.Value<string>("propertyGuid");
}
private void CreatePorts(AbstractProperty property) {
Port createdPort;
switch (property.Type) {
case PropertyType.Trigger:
createdPort = DlogPort.Create("", Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, PortType.Trigger, false,edgeConnectorListener);
break;
case PropertyType.Check:
createdPort = DlogPort.Create("", Orientation.Horizontal, Direction.Output, Port.Capacity.Multi, PortType.Check, false, edgeConnectorListener);
break;
case PropertyType.Actor:
createdPort = DlogPort.Create("", Orientation.Horizontal, Direction.Output, Port.Capacity.Multi, PortType.Actor, false, edgeConnectorListener);
break;
default:
throw new ArgumentOutOfRangeException();
}
AddPort(createdPort, false);
if(createdPort.direction == Direction.Output)
titleContainer.Add(createdPort);
else {
titleContainer.Insert(0, createdPort);
titleContainer.AddToClassList("property-port-input");
}
Update(property);
Refresh();
}
public void Update(AbstractProperty property) {
title = property.DisplayName;
Refresh();
}
}
}
================================================
FILE: Editor/Graph/Nodes/PropertyNode.cs.meta
================================================
fileFormatVersion: 2
guid: 1216d6e8ec004cadaf5f4ea56001aabb
timeCreated: 1602589699
================================================
FILE: Editor/Graph/Nodes/SelfNode.cs
================================================
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEditor.Experimental.GraphView;
using UnityEngine.UIElements;
#pragma warning disable 618
namespace DialogueGraph {
public class LineDataSelf {
public string Line;
public string PortGuidA;
public string PortGuidB;
}
[Title("Self")]
public class SelfNode : AbstractNode {
public List<LineDataSelf> Lines = new List<LineDataSelf>();
private VisualElement lineLabel;
public override void InitializeNode(EdgeConnectorListener edgeConnectorListener) {
base.InitializeNode(edgeConnectorListener);
Initialize("Self", EditorView.DefaultNodePosition);
lineLabel = new Label {name = "lineTitle", text = "Lines"};
outputContainer.Add(lineLabel);
var button = new Button(() => AddConversationPort(true)) {text = "Create Dialogue Line"};
extensionContainer.Add(button);
var titleLabel = this.Q<Label>("title-label");
var titleElement = this.Q("title");
var titleC = UIElementsFactory.VisualElement<VisualElement>("title-container", null);
titleLabel.RemoveFromHierarchy();
titleC.Add(titleLabel);
titleElement.Insert(0, titleC);
var branchPort = DlogPort.Create("Branch", Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, PortType.Branch, true, edgeConnectorListener);
branchPort.AddToClassList("square-circle");
titleC.Insert(0, branchPort);
AddPort(branchPort, false);
Refresh();
}
public override void SetNodeData(string jsonData) {
if (string.IsNullOrEmpty(jsonData)) return;
base.SetNodeData(jsonData);
var data = JObject.Parse(jsonData);
var lines = JsonConvert.DeserializeObject<List<LineDataSelf>>(data.Value<string>("lines"));
Lines.Clear();
Lines.AddRange(lines);
for (var i = 0; i < Lines.Count; i++)
AddConversationPort(false, i);
}
public override string GetNodeData() {
var root = new JObject();
root["lines"] = new JValue(JsonConvert.SerializeObject(Lines));
root.Merge(JObject.Parse(base.GetNodeData()));
return root.ToString(Formatting.None);
}
private void AddConversationPort(bool create, int index = -1) {
var conversationContainer = new VisualElement {name = "conversation-container"};
lineLabel.AddToClassList("visible");
if (create) {
Owner.EditorView.DlogObject.RegisterCompleteObjectUndo("Created Dialogue Line");
index = Lines.Count;
Lines.Add(new LineDataSelf {Line = ""});
}
var message = UIElementsFactory.TextField("conversation-item", "Line", new[] {"message"}, null, null, true);
if (!create)
message.SetValueWithoutNotify(Lines[index].Line);
var branchPort = DlogPort.Create("Branch", Orientation.Horizontal, Direction.Output, Port.Capacity.Single, PortType.Branch, true, EdgeConnectorListener);
branchPort.name = "conversation-item";
branchPort.AddToClassList("branch-port");
var triggerPort = DlogPort.Create("Trigger", Orientation.Horizontal, Direction.Output, Port.Capacity.Multi, PortType.Trigger, false, EdgeConnectorListener);
triggerPort.name = "conversation-item";
triggerPort.AddToClassList("trigger-port");
var flexBreak = UIElementsFactory.FlexBreaker();
if (create) {
Lines[index].PortGuidA = branchPort.viewDataKey;
Lines[index].PortGuidB = triggerPort.viewDataKey;
} else {
branchPort.viewDataKey = Lines[index].PortGuidA;
triggerPort.viewDataKey = Lines[index].PortGuidB;
}
message.RegisterCallback<FocusOutEvent>(evt => {
var lineIndex = Lines.FindIndex(data => data.PortGuidA == branchPort.viewDataKey);
if (message.value != Lines[lineIndex].Line) {
Owner.EditorView.DlogObject.RegisterCompleteObjectUndo("Changed Dialogue Line");
Lines[lineIndex].Line = message.value;
}
});
var removeButton = UIElementsFactory.Button("x", "conversation-item", "Remove line", new[] {"remove-button"}, () => { RemoveLine(Lines.FindIndex(data => data.PortGuidA == branchPort.viewDataKey)); });
conversationContainer.Add(message);
conversationContainer.Add(branchPort);
conversationContainer.Add(flexBreak);
conversationContainer.Add(removeButton);
conversationContainer.Add(triggerPort);
var separator = new VisualElement {name = "divider"};
separator.AddToClassList("horizontal");
separator.AddToClassList("horizontal-divider");
outputContainer.Add(separator);
outputContainer.Add(conversationContainer);
Ports.Add(branchPort);
Ports.Add(triggerPort);
if (create) {
Owner.PortData.Add(branchPort.viewDataKey);
Owner.PortData.Add(triggerPort.viewDataKey);
Owner.GuidPortDictionary.Add(branchPort.viewDataKey, branchPort);
Owner.GuidPortDictionary.Add(triggerPort.viewDataKey, triggerPort);
}
Refresh();
}
private void RemoveLine(int index) {
if (Lines.Count == 1)
lineLabel.RemoveFromClassList("visible");
var container = outputContainer.Children().Where(element => element.name == "conversation-container").ToList()[index];
var separator = outputContainer.Children().Where(element => element.name == "divider" && element.ClassListContains("horizontal-divider")).ToList()[index];
outputContainer.Remove(separator);
Owner.EditorView.DlogObject.RegisterCompleteObjectUndo("Removed Line");
var edgesToRemove = Owner.EditorView.DlogObject.DlogGraph.Edges.Where(edge => edge.InputPort == Lines[index].PortGuidA || edge.OutputPort == Lines[index].PortGuidA).ToList();
edgesToRemove.AddRange(Owner.EditorView.DlogObject.DlogGraph.Edges.Where(edge => edge.InputPort == Lines[index].PortGuidB || edge.OutputPort == Lines[index].PortGuidB));
Owner.EditorView.DlogObject.DlogGraph.RemoveElements(new List<SerializedNode>(), edgesToRemove);
Owner.PortData.Remove(Lines[index].PortGuidA);
Owner.PortData.Remove(Lines[index].PortGuidB);
var portA = Owner.GuidPortDictionary[Lines[index].PortGuidA];
var portB = Owner.GuidPortDictionary[Lines[index].PortGuidB];
Owner.GuidPortDictionary.Remove(Lines[index].PortGuidA);
Owner.GuidPortDictionary.Remove(Lines[index].PortGuidB);
Ports.Remove(portA);
Ports.Remove(portB);
Lines.RemoveAt(index);
outputContainer.Remove(container);
Refresh();
}
}
}
================================================
FILE: Editor/Graph/Nodes/SelfNode.cs.meta
================================================
fileFormatVersion: 2
guid: 86aadea30b7e406383c74d6a4f1323bb
timeCreated: 1602664809
================================================
FILE: Editor/Graph/Nodes.meta
================================================
fileFormatVersion: 2
guid: 6aacdf43d48142e2991d013ac6530c86
timeCreated: 1601474215
================================================
FILE: Editor/Graph/Views/Blackboard/BlackboardPropertyView.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using DialogueGraph.Runtime;
using UnityEditor;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using UnityEngine.UIElements;
namespace DialogueGraph {
public class BlackboardPropertyView : VisualElement {
private readonly BlackboardField field;
private readonly EditorView editorView;
private AbstractProperty property;
private TextField referenceNameField;
public List<VisualElement> Rows { get; }
public int UndoGroup { get; private set; } = -1;
private static Type contextualMenuManipulator = AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes()).FirstOrDefault(t => t.FullName == "UnityEngine.UIElements.ContextualMenuManipulator");
private IManipulator resetReferenceMenu;
public EventCallback<KeyDownEvent> KeyDownCallback { get; }
public EventCallback<FocusOutEvent> FocusOutCallback { get; }
public BlackboardPropertyView(BlackboardField field, EditorView editorView, AbstractProperty property) {
this.AddStyleSheet("Styles/PropertyView/Blackboard");
this.field = field;
this.editorView = editorView;
this.property = property;
Rows = new List<VisualElement>();
KeyDownCallback = evt => {
// Record Undo for input field edit
if (UndoGroup == -1) {
UndoGroup = Undo.GetCurrentGroup();
editorView.DlogObject.RegisterCompleteObjectUndo("Change property value");
}
// Handle escaping input field edit
if (evt.keyCode == KeyCode.Escape && UndoGroup > -1) {
Undo.RevertAllDownToGroup(UndoGroup);
UndoGroup = -1;
evt.StopPropagation();
}
// Dont record Undo again until input field is unfocused
UndoGroup++;
MarkDirtyRepaint();
};
FocusOutCallback = evt => UndoGroup = -1;
BuildFields(property);
AddToClassList("blackboardPropertyView");
}
private void BuildFields(AbstractProperty property) {
referenceNameField = new TextField(512, false, false, ' ') {isDelayed = true, value = property.ReferenceName};
referenceNameField.AddStyleSheet("Styles/PropertyView/ReferenceNameField");
referenceNameField.RegisterValueChangedCallback(evt => {
editorView.DlogObject.RegisterCompleteObjectUndo("Change Reference Name");
editorView.DlogObject.DlogGraph.SanitizePropertyReference(property, evt.newValue);
referenceNameField.value = property.ReferenceName;
if (string.IsNullOrEmpty(property.OverrideReferenceName))
referenceNameField.RemoveFromClassList("modified");
else
referenceNameField.AddToClassList("modified");
Rebuild();
UpdateReferenceNameResetMenu();
});
if (!string.IsNullOrEmpty(property.OverrideReferenceName))
referenceNameField.AddToClassList("modified");
AddRow("Reference Name", referenceNameField);
}
private void UpdateReferenceNameResetMenu() {
if (string.IsNullOrEmpty(property.OverrideReferenceName)) {
this.RemoveManipulator(resetReferenceMenu);
resetReferenceMenu = null;
} else {
resetReferenceMenu = (IManipulator) Activator.CreateInstance(contextualMenuManipulator, (Action<ContextualMenuPopulateEvent>) BuildContextualMenu);
this.AddManipulator(resetReferenceMenu);
}
}
private void BuildContextualMenu(ContextualMenuPopulateEvent evt) {
evt.menu.AppendAction("Reset Reference", e => {
property.OverrideReferenceName = null;
referenceNameField.value = property.ReferenceName;
referenceNameField.RemoveFromClassList("modified");
}, DropdownMenuAction.AlwaysEnabled);
}
public VisualElement AddRow(string labelText, VisualElement control, bool enabled = true) {
var rowView = CreateRow(labelText, control, enabled);
Add(rowView);
Rows.Add(rowView);
return rowView;
}
public void Rebuild() {
Rows.Where(t => t.parent == this).ToList().ForEach(Remove);
BuildFields(property);
}
private VisualElement CreateRow(string labelText, VisualElement control, bool enabled) {
var rowView = new VisualElement();
rowView.AddToClassList("rowView");
if (!string.IsNullOrEmpty(labelText)) {
var label = new Label(labelText);
label.SetEnabled(enabled);
label.AddToClassList("rowViewLabel");
rowView.Add(label);
}
control.AddToClassList("rowViewControl");
control.SetEnabled(enabled);
rowView.Add(control);
return rowView;
}
}
}
================================================
FILE: Editor/Graph/Views/Blackboard/BlackboardPropertyView.cs.meta
================================================
fileFormatVersion: 2
guid: 10eb046d63d54e71b2a354f974cbc412
timeCreated: 1602594572
================================================
FILE: Editor/Graph/Views/Blackboard/BlackboardProvider.cs
================================================
using System.Collections.Generic;
using System.Linq;
using DialogueGraph.Runtime;
using UnityEditor;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using UnityEngine.UIElements;
using Node = UnityEditor.Experimental.GraphView.Node;
namespace DialogueGraph {
public class BlackboardProvider {
private static readonly Texture2D exposedIcon = Resources.Load<Texture2D>("GraphView/Nodes/BlackboardFieldExposed");
public Blackboard Blackboard { get; private set; }
private readonly EditorView editorView;
private readonly Dictionary<string, BlackboardRow> inputRows;
private readonly BlackboardSection checkSection;
private readonly BlackboardSection triggerSection;
private readonly BlackboardSection actorSection;
private List<Node> selectedNodes = new List<Node>();
public Dictionary<string, bool> ExpandedInputs { get; } = new Dictionary<string, bool>();
public string AssetName {
get => Blackboard.title;
set => Blackboard.title = value;
}
public BlackboardProvider(EditorView editorView) {
this.editorView = editorView;
inputRows = new Dictionary<string, BlackboardRow>();
Blackboard = new Blackboard {
scrollable = true,
title = "Properties",
subTitle = "Dialogue Graph",
editTextRequested = EditTextRequested,
addItemRequested = AddItemRequested,
moveItemRequested = MoveItemRequested
};
checkSection = new BlackboardSection {title = "Checks"};
Blackboard.Add(checkSection);
triggerSection = new BlackboardSection {title = "Triggers"};
Blackboard.Add(triggerSection);
actorSection = new BlackboardSection {title = "Actors"};
Blackboard.Add(actorSection);
}
private void EditTextRequested(Blackboard blackboard, VisualElement visualElement, string newText) {
var field = (BlackboardField) visualElement;
var property = (AbstractProperty) field.userData;
if (!string.IsNullOrEmpty(newText) && newText != property.DisplayName) {
editorView.DlogObject.RegisterCompleteObjectUndo("Edit Property Name");
property.DisplayName = newText;
editorView.DlogObject.DlogGraph.SanitizePropertyName(property);
field.text = property.DisplayName;
var modifiedNodes = editorView.DlogObject.DlogGraph.Nodes.Where(node => node.Node is PropertyNode propertyNode && propertyNode.PropertyGuid == property.GUID).Select(node => node.Node as PropertyNode);
foreach (var modifiedNode in modifiedNodes) {
modifiedNode?.Update(property);
}
}
}
private void MoveItemRequested(Blackboard blackboard, int newIndex, VisualElement visualElement) {
if (!(visualElement.userData is AbstractProperty property))
return;
editorView.DlogObject.RegisterCompleteObjectUndo("Move Property");
editorView.DlogObject.DlogGraph.MoveProperty(property, newIndex);
}
private void AddItemRequested(Blackboard blackboard) {
var menu = new GenericMenu();
menu.AddItem(new GUIContent($"Check"), false, () => AddInputRow(new CheckProperty(), true));
menu.AddItem(new GUIContent($"Trigger"), false, () => AddInputRow(new TriggerProperty(), true));
menu.AddItem(new GUIContent($"Actor"), false, () => AddInputRow(new ActorProperty(), true));
menu.ShowAsContext();
}
public void AddInputRow(AbstractProperty property, bool create = false, int index = -1) {
if (inputRows.ContainsKey(property.GUID))
return;
var section = property.Type == PropertyType.Actor ? actorSection : property.Type == PropertyType.Check ? checkSection : triggerSection;
if (create) {
editorView.DlogObject.DlogGraph.SanitizePropertyName(property);
}
var field = new BlackboardField(exposedIcon, property.DisplayName, property.Type.ToString()) {userData = property};
var row = new BlackboardRow(field, new BlackboardPropertyView(field, editorView, property)) {userData = property};
if (index < 0)
index = inputRows.Count;
if (index == inputRows.Count)
section.Add(row);
else
section.Insert(index, row);
var pill = row.Q<Pill>();
pill.RegisterCallback<MouseEnterEvent>(evt => OnMouseHover(evt, property));
pill.RegisterCallback<MouseLeaveEvent>(evt => OnMouseHover(evt, property));
pill.RegisterCallback<DragUpdatedEvent>(OnDragUpdatedEvent);
var expandButton = row.Q<Button>("expandButton");
expandButton.RegisterCallback<MouseDownEvent>(evt => OnExpanded(evt, property), TrickleDown.TrickleDown);
inputRows[property.GUID] = row;
if (!create)
return;
row.expanded = true;
ExpandedInputs[property.GUID] = true;
editorView.DlogObject.RegisterCompleteObjectUndo("Create Property");
editorView.DlogObject.DlogGraph.AddProperty(property);
field.OpenTextEditor();
}
private void OnExpanded(MouseDownEvent evt, AbstractProperty input) {
ExpandedInputs[input.GUID] = !inputRows[input.GUID].expanded;
}
private void OnMouseHover(EventBase evt, AbstractProperty input) {
if (evt.eventTypeId == MouseEnterEvent.TypeId()) {
foreach (var node in editorView.GraphView.nodes.ToList()) {
if (node.viewDataKey == input.GUID) {
selectedNodes.Add(node);
node.AddToClassList("hovered");
}
}
} else if (evt.eventTypeId == MouseLeaveEvent.TypeId() && selectedNodes.Any()) {
foreach (var node in selectedNodes) {
node.RemoveFromClassList("hovered");
}
selectedNodes.Clear();
}
}
private void OnDragUpdatedEvent(DragUpdatedEvent evt) {
if (selectedNodes.Any()) {
foreach (var node in selectedNodes) {
node.RemoveFromClassList("hovered");
}
selectedNodes.Clear();
}
}
public void HandleChanges() {
foreach (var inputGuid in editorView.DlogObject.DlogGraph.RemovedProperties) {
if (!inputRows.TryGetValue(inputGuid.GUID, out var row))
continue;
row.RemoveFromHierarchy();
inputRows.Remove(inputGuid.GUID);
}
foreach (var input in editorView.DlogObject.DlogGraph.AddedProperties)
AddInputRow(input, index: editorView.DlogObject.DlogGraph.Properties.IndexOf(input));
if (editorView.DlogObject.DlogGraph.MovedProperties.Any()) {
foreach (var row in inputRows.Values)
row.RemoveFromHierarchy();
foreach (var property in editorView.DlogObject.DlogGraph.Properties)
(property.Type == PropertyType.Actor ? actorSection : property.Type == PropertyType.Check ? checkSection : triggerSection).Add(inputRows[property.GUID]);
}
ExpandedInputs.Clear();
}
}
}
================================================
FILE: Editor/Graph/Views/Blackboard/BlackboardProvider.cs.meta
================================================
fileFormatVersion: 2
guid: 181433fccd214f9390d7f42778f4d9aa
timeCreated: 1601568462
================================================
FILE: Editor/Graph/Views/Blackboard.meta
================================================
fileFormatVersion: 2
guid: 2acfa4296e274da2b3b7d0cec23ea30f
timeCreated: 1602594556
================================================
FILE: Editor/Graph/Views/DlogEditorWindow.cs
================================================
using System;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;
using Object = UnityEngine.Object;
namespace DialogueGraph {
public class DlogEditorWindow : EditorWindow {
private EditorView editorView;
private bool deleted;
private bool skipOnDestroyCheck;
public string SelectedAssetGuid { get; set; }
public DlogGraphObject GraphObject { get; private set; }
public DlogWindowEvents Events { get; private set; }
public bool IsDirty {
get {
if (deleted) return false;
if (GraphObject == null) return false;
var current = JsonUtility.ToJson(GraphObject.DlogGraph, true);
var saved = File.ReadAllText(AssetDatabase.GUIDToAssetPath(SelectedAssetGuid));
return !string.Equals(current, saved, StringComparison.Ordinal);
}
}
public void BuildWindow() {
rootVisualElement.Clear();
Events = new DlogWindowEvents {SaveRequested = SaveAsset, SaveAsRequested = SaveAs, ShowInProjectRequested = ShowInProject};
editorView = new EditorView(this) {
name = "Dlog Graph",
IsBlackboardVisible = GraphObject.IsBlackboardVisible
};
rootVisualElement.Add(editorView);
Refresh();
}
private void Update() {
if (focusedWindow == this && deleted) {
DisplayDeletedFromDiskDialog();
}
if (GraphObject == null && SelectedAssetGuid != null) {
var assetGuid = SelectedAssetGuid;
SelectedAssetGuid = null;
var newObject = DialogueGraphUtility.LoadGraphAtGuid(assetGuid);
SetDlogObject(newObject);
Refresh();
}
if (GraphObject == null) {
Close();
return;
}
if (editorView == null && GraphObject != null) {
BuildWindow();
}
if (editorView == null) {
Close();
}
var wasUndoRedoPerformed = GraphObject.WasUndoRedoPerformed;
if (wasUndoRedoPerformed) {
editorView.HandleChanges();
GraphObject.DlogGraph.ClearChanges();
GraphObject.HandleUndoRedo();
}
if (GraphObject.IsDirty || wasUndoRedoPerformed) {
UpdateTitle();
GraphObject.IsDirty = false;
}
editorView.HandleChanges();
GraphObject.DlogGraph.ClearChanges();
}
private void DisplayDeletedFromDiskDialog() {
bool shouldClose = true; // Close unless if the same file was replaced
if (EditorUtility.DisplayDialog("Dialogue Graph Missing", $"{AssetDatabase.GUIDToAssetPath(SelectedAssetGuid)} has been deleted or moved outside of Unity.\n\nWould you like to save your Graph Asset?", "Save As", "Close Window")) {
shouldClose = !SaveAs();
}
if (shouldClose)
Close();
else
deleted = false; // Was restored
}
public void SetDlogObject(DlogGraphObject dlogObject) {
SelectedAssetGuid = dlogObject.AssetGuid;
GraphObject = dlogObject;
}
public void Refresh() {
UpdateTitle();
if (editorView == null) {
editorView = rootVisualElement.Q<EditorView>();
}
if (editorView == null) {
BuildWindow();
}
editorView.BuildGraph();
}
public void GraphDeleted() {
deleted = true;
}
private void UpdateTitle() {
var asset = AssetDatabase.LoadAssetAtPath<Object>(AssetDatabase.GUIDToAssetPath(SelectedAssetGuid));
titleContent.text = asset.name.Split('/').Last() + (IsDirty ? "*" : "");
}
private void OnEnable() {
this.SetAntiAliasing(4);
}
private void OnDestroy() {
if (!skipOnDestroyCheck && IsDirty && EditorUtility.DisplayDialog("Dialogue Graph has been modified", "Do you want to save the changes you made in the Dialogue Graph?\nYour changes will be lost if you don't save them.", "Save", "Don't Save")) {
SaveAsset();
}
}
#region Window Events
private void SaveAsset() {
GraphObject.DlogGraph.DialogueGraphVersion = DialogueGraphUtility.LatestVersion;
DialogueGraphUtility.SaveGraph(GraphObject);
UpdateTitle();
}
private bool SaveAs() {
if (!string.IsNullOrEmpty(SelectedAssetGuid) && GraphObject != null) {
var assetPath = AssetDatabase.GUIDToAssetPath(SelectedAssetGuid);
if (string.IsNullOrEmpty(assetPath) || GraphObject == null)
return false;
var directoryPath = Path.GetDirectoryName(assetPath);
var savePath = EditorUtility.SaveFilePanelInProject("Save As...", Path.GetFileNameWithoutExtension(assetPath), DlogGraphImporter.Extension, "", directoryPath);
savePath = savePath.Replace(Application.dataPath, "Assets");
if (savePath != directoryPath) {
if (!string.IsNullOrEmpty(savePath)) {
if (DialogueGraphUtility.CreateFile(savePath, GraphObject)) {
GraphObject.RecalculateAssetGuid(savePath);
DlogGraphImporterEditor.OpenEditorWindow(savePath);
}
}
GraphObject.IsDirty = false;
return false;
}
SaveAsset();
GraphObject.IsDirty = false;
return true;
}
return false;
}
private void ShowInProject() {
if (string.IsNullOrEmpty(SelectedAssetGuid)) return;
var path = AssetDatabase.GUIDToAssetPath(SelectedAssetGuid);
var asset = AssetDatabase.LoadAssetAtPath<Object>(path);
EditorGUIUtility.PingObject(asset);
}
#endregion
}
}
================================================
FILE: Editor/Graph/Views/DlogEditorWindow.cs.meta
================================================
fileFormatVersion: 2
guid: e93a505429977a248b411e4eff69e2ee
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Editor/Graph/Views/DlogGraphView.cs
================================================
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEditor.Experimental.GraphView;
using UnityEngine;
using UnityEngine.UIElements;
namespace DialogueGraph {
public class DlogGraphView : GraphView {
public EditorView EditorView { get; }
public DlogGraphData DlogGraph => EditorView.DlogObject.DlogGraph;
public DlogGraphView(EditorView editorView) {
EditorView = editorView;
RegisterCallback<DragUpdatedEvent>(OnDragUpdated);
RegisterCallback<DragPerformEvent>(OnDragPerformed);
serializeGraphElements = SerializeGraphElementsImpl;
unserializeAndPaste = UnserializeAndPasteImpl;
deleteSelection = DeleteSelectionImpl;
}
protected override bool canCopySelection => selection.OfType<AbstractNode>().Any() || selection.OfType<Group>().Any() || selection.OfType<BlackboardField>().Any();
private void UnserializeAndPasteImpl(string operation, string data) {
EditorView.DlogObject.RegisterCompleteObjectUndo(operation);
var copyPasteData = CopyPasteData.FromJson(data);
this.InsertCopyPasteData(copyPasteData);
}
private string SerializeGraphElementsImpl(IEnumerable<GraphElement> elements) {
var elementsList = elements.ToList();
var nodes = elementsList.OfType<AbstractNode>().Select(x => x.Owner);
var edges = elementsList.OfType<Edge>().Select(x => x.userData).OfType<SerializedEdge>();
var properties = selection.OfType<BlackboardField>().Select(x => x.userData as AbstractProperty);
// Collect the property nodes and get the corresponding properties
var propertyNodeGuids = nodes.OfType<PropertyNode>().Select(x => x.PropertyGuid);
var metaProperties = EditorView.DlogObject.DlogGraph.Properties.Where(x => propertyNodeGuids.Contains(x.GUID));
var copyPasteData = new CopyPasteData(EditorView, nodes, edges, properties, metaProperties);
return JsonUtility.ToJson(copyPasteData, true);
}
public override void BuildContextualMenu(ContextualMenuPopulateEvent evt) {
base.BuildContextualMenu(evt);
evt.menu.AppendSeparator();
if (evt.target is Node || evt.target is StickyNote) {
// TODO: GROUP
evt.menu.AppendAction("Group Selection %g", _ => { }, actionStatusCallback => DropdownMenuAction.Status.Disabled);
// TODO: UNGROUP
evt.menu.AppendAction("Ungroup Selection %u", _ => { }, actionStatusCallback => DropdownMenuAction.Status.Disabled);
}
if (evt.target is BlackboardField) {
evt.menu.AppendAction("Delete", _ => { DeleteSelectionImpl("Delete", AskUser.DontAskUser); }, actionStatusCallback => canDeleteSelection ? DropdownMenuAction.Status.Normal : DropdownMenuAction.Status.Disabled);
}
}
public override List<Port> GetCompatiblePorts(Port startPort, NodeAdapter nodeAdapter) {
var compatiblePorts = new List<Port>();
ports.ForEach(port => {
if (startPort != port /*&& startPort.node != port.node*/ && port.direction != startPort.direction && (startPort as DlogPort).IsCompatibleWith(port as DlogPort)) {
compatiblePorts.Add(port);
}
});
return compatiblePorts;
}
private void DeleteSelectionImpl(string operation, AskUser askUser) {
var nodesToDelete = selection.OfType<AbstractNode>().Select(node => node.Owner);
EditorView.DlogObject.RegisterCompleteObjectUndo(operation);
EditorView.DlogObject.DlogGraph.RemoveElements(nodesToDelete.ToList(),
selection.OfType<Edge>().Select(e => e.userData).OfType<SerializedEdge>().ToList());
foreach (var selectable in selection) {
if (!(selectable is BlackboardField field) || field.userData == null)
continue;
var property = (AbstractProperty) field.userData;
EditorView.DlogObject.DlogGraph.RemoveProperty(property);
}
selection.Clear();
}
#region Drag & Drop
private void OnDragUpdated(DragUpdatedEvent evt) {
var selection = DragAndDrop.GetGenericData("DragSelection") as List<ISelectable>;
var dragging = false;
if (selection != null)
if (selection.OfType<BlackboardField>().Any())
dragging = true;
if (dragging) {
DragAndDrop.visualMode = DragAndDropVisualMode.Generic;
}
}
private void OnDragPerformed(DragPerformEvent evt) {
Vector2 localPos = (evt.currentTarget as VisualElement).ChangeCoordinatesTo(this.contentViewContainer, evt.localMousePosition);
var selection = DragAndDrop.GetGenericData("DragSelection") as List<ISelectable>;
if (selection != null) {
// Blackboard
if (selection.OfType<BlackboardField>().Any()) {
var fields = selection.OfType<BlackboardField>();
foreach (var field in fields) {
CreateNode(field, localPos);
}
}
}
}
private void CreateNode(object obj, Vector2 nodePosition) {
if (obj is BlackboardField blackboardField) {
EditorView.DlogObject.RegisterCompleteObjectUndo("Drag Blackboard Field");
var property = blackboardField.userData as AbstractProperty;
var node = new SerializedNode(typeof(PropertyNode), new Rect(nodePosition, EditorView.DefaultNodeSize));
EditorView.DlogObject.DlogGraph.AddNode(node);
node.BuildNode(EditorView, EditorView.EdgeConnectorListener, false);
var propertyNode = node.Node as PropertyNode;
propertyNode.PropertyGuid = property.GUID;
node.BuildPortData();
}
}
#endregion
}
}
================================================
FILE: Editor/Graph/Views/DlogGraphView.cs.meta
================================================
fileFormatVersion: 2
guid: 3a9050fcf358d544498b82a8536f4c82
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
================================================
FILE: Editor/Graph/Views/DlogWindowEvents.cs
================================================
using System;
namespace DialogueGraph {
public class DlogWindowEvents {
public Action SaveRequested;
public Func<bool> SaveAsRequested;
public Action ShowInProjectRequested;
}
}
================================================
FILE: Editor/Graph/Views/DlogWindowEvents.cs.meta
================================================
fileFormatVersion: 2
guid: 27bb48f0da2c4f3da96d42285852c486
timeCreated: 1601297810
================================================
FILE: Editor/Graph/Views/EdgeConnectorListener.cs
================================================
using System.Collections.Generic;
using UnityEditor.Experimental.GraphView;
using UnityEditor.Searcher;
using UnityEngine;
namespace DialogueGraph {
public class EdgeConnectorListener : IEdgeConnectorListener {
private EditorView editorView;
private SearchWindowProvider searchWindowProvider;
private GraphViewChange graphViewChange;
private List<Edge> edgesToCreate;
private List<GraphElement> edgesToDelete;
public EdgeConnectorListener(EditorView editorView, SearchWindowProvider searchWindowProvider) {
this.editorView = editorView;
this.searchWindowProvider = searchWindowProvider;
edgesToCreate = new List<Edge>();
edgesToDelete = new List<GraphElement>();
graphViewChange.edgesToCreate = edgesToCreate;
}
public void OnDropOutsidePort(Edge edge, Vector2 position) {
var port = edge.output?.edgeConnector.edgeDragHelper.draggedPort ?? edge.input?.edgeConnector.edgeDragHelper.draggedPort;
searchWindowProvider.ConnectedPort = port;
searchWindowProvider.RegenerateEntries = true;
SearcherWindow.Show(editorView.EditorWindow, searchWindowProvider.LoadSearchWindow(), item => searchWindowProvider.OnSelectEntry(item, position), position, null);
searchWindowProvider.RegenerateEntries = true;
}
public void OnDrop(GraphView graphView, Edge edge) {
if(editorView.DlogObject.DlogGraph.HasEdge(edge)) return;
editorView.DlogObject.RegisterCompleteObjectUndo("Connect edge");
editorView.DlogObject.DlogGraph.AddEdge(edge);
}
}
}
================================================
FILE: Editor/Graph/Views/EdgeConnectorListener.cs.meta
================================================
fileFormatVersion: 2
guid: 46ff9171b1404674a3d78ef287c8bd46
timeCreated: 1601564609
================================================
FILE: Editor/Graph/Views/EditorView.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEditor.Experimental.GraphView;
using UnityEditor.Searcher;
using UnityEngine;
using UnityEngine.UIElements;
using Object = UnityEngine.Object;
namespace DialogueGraph {
public class EditorView : VisualElement, IDisposable {
public static readonly Vector2 DefaultNodeSize = new Vector2(200, 150);
public static readonly Rect DefaultNodePosition = new Rect(Vector2.zero, DefaultNodeSize);
private readonly BlackboardProvider blackboardProvider;
private SearchWindowProvider searchWindowProvider;
public bool IsBlackboardVisible {
get => blackboardProvider.Blackboard.style.display == DisplayStyle.Flex;
set => blackboardProvider.Blackboard.style.display = value ? DisplayStyle.Flex : DisplayStyle.None;
}
public DlogEditorWindow EditorWindow { get; }
public DlogGraphObject DlogObject => EditorWindow.GraphObject;
public DlogGraphView GraphView { get; }
public EdgeConnectorListener EdgeConnectorListener { get; }
public EditorView(DlogEditorWindow editorWindow) {
EditorWindow = editorWindow;
this.AddStyleSheet("Styles/Graph");
var toolbar = new IMGUIContainer(() => {
GUILayout.BeginHorizontal(EditorStyles.toolbar);
if (GUILayout.Button("Save Graph", EditorStyles.toolbarButton)) {
EditorWindow.Events.SaveRequested?.Invoke();
}
GUILayout.Space(6);
if (GUILayout.Button("Save As...", EditorStyles.toolbarButton)) {
EditorWindow.Events.SaveAsRequested?.Invoke();
}
GUILayout.Space(6);
if (GUILayout.Button("Show In Project", EditorStyles.toolbarButton)) {
EditorWindow.Events.ShowInProjectRequested?.Invoke();
}
GUILayout.FlexibleSpace();
IsBlackboardVisible = GUILayout.Toggle(IsBlackboardVisible, "Blackboard", EditorStyles.toolbarButton);
editorWindow.GraphObject.IsBlackboardVisible = IsBlackboardVisible;
GUILayout.EndHorizontal();
});
Add(toolbar);
var content = new VisualElement {name="content"};
{
GraphView = new DlogGraphView(this);
GraphView.SetupZoom(0.05f, 8f);
GraphView.AddManipulator(new ContentDragger())
gitextract_spodhmoi/ ├── .github/ │ └── FUNDING.yml ├── .gitignore ├── Dependencies/ │ ├── SerializableCallback/ │ │ ├── .gitignore │ │ ├── Editor/ │ │ │ ├── SerializableCallbackDrawer.cs │ │ │ ├── SerializableCallbackDrawer.cs.meta │ │ │ ├── Siccity.SerializableCallback.Editor.asmdef │ │ │ └── Siccity.SerializableCallback.Editor.asmdef.meta │ │ ├── Editor.meta │ │ ├── LICENSE.md │ │ ├── LICENSE.md.meta │ │ ├── README.md │ │ ├── README.md.meta │ │ ├── Runtime/ │ │ │ ├── Attributes/ │ │ │ │ ├── TargetConstraintAttribute.cs │ │ │ │ └── TargetConstraintAttribute.cs.meta │ │ │ ├── Attributes.meta │ │ │ ├── InvokableCallback.cs │ │ │ ├── InvokableCallback.cs.meta │ │ │ ├── InvokableCallbackBase.cs │ │ │ ├── InvokableCallbackBase.cs.meta │ │ │ ├── InvokableEvent.cs │ │ │ ├── InvokableEvent.cs.meta │ │ │ ├── InvokableEventBase.cs │ │ │ ├── InvokableEventBase.cs.meta │ │ │ ├── SerializableCallback.cs │ │ │ ├── SerializableCallback.cs.meta │ │ │ ├── SerializableCallbackBase.cs │ │ │ ├── SerializableCallbackBase.cs.meta │ │ │ ├── SerializableEvent.cs │ │ │ ├── SerializableEvent.cs.meta │ │ │ ├── SerializableEventBase.cs │ │ │ ├── SerializableEventBase.cs.meta │ │ │ ├── Siccity.SerializableCallback.asmdef │ │ │ ├── Siccity.SerializableCallback.asmdef.meta │ │ │ ├── Test.cs │ │ │ └── Test.cs.meta │ │ ├── Runtime.meta │ │ ├── package.json │ │ └── package.json.meta │ ├── SerializableCallback.meta │ ├── SerializableDictionary/ │ │ ├── Editor/ │ │ │ ├── SerializableDictionary.Editor.asmdef │ │ │ ├── SerializableDictionary.Editor.asmdef.meta │ │ │ ├── SerializableDictionaryPropertyDrawer.cs │ │ │ └── SerializableDictionaryPropertyDrawer.cs.meta │ │ ├── Editor.meta │ │ ├── LICENSE.md │ │ ├── LICENSE.md.meta │ │ ├── Runtime/ │ │ │ ├── SerializableDictionary.Runtime.asmdef │ │ │ ├── SerializableDictionary.Runtime.asmdef.meta │ │ │ ├── SerializableDictionary.cs │ │ │ └── SerializableDictionary.cs.meta │ │ └── Runtime.meta │ └── SerializableDictionary.meta ├── Dependencies.meta ├── Editor/ │ ├── AssetCallbacks/ │ │ ├── CreateDlogGraph.cs │ │ └── CreateDlogGraph.cs.meta │ ├── AssetCallbacks.meta │ ├── DialogueGraph.Editor.asmdef │ ├── DialogueGraph.Editor.asmdef.meta │ ├── Extensions/ │ │ ├── DlogExtensions.cs │ │ ├── DlogExtensions.cs.meta │ │ ├── GUILayoutHelper.cs │ │ ├── GUILayoutHelper.cs.meta │ │ ├── GraphViewExtensions.cs │ │ ├── GraphViewExtensions.cs.meta │ │ ├── VisualElementExtensions.cs │ │ └── VisualElementExtensions.cs.meta │ ├── Extensions.meta │ ├── Graph/ │ │ ├── Attributes/ │ │ │ ├── TitleAttribute.cs │ │ │ └── TitleAttribute.cs.meta │ │ ├── Attributes.meta │ │ ├── Data/ │ │ │ ├── CopyPasteData.cs │ │ │ ├── CopyPasteData.cs.meta │ │ │ ├── DlogGraphData.cs │ │ │ ├── DlogGraphData.cs.meta │ │ │ ├── DlogGraphObject.cs │ │ │ ├── DlogGraphObject.cs.meta │ │ │ ├── NodeDrawState.cs │ │ │ ├── NodeDrawState.cs.meta │ │ │ ├── Properties/ │ │ │ │ ├── AbstractProperty.cs │ │ │ │ ├── AbstractProperty.cs.meta │ │ │ │ ├── ActorProperty.cs │ │ │ │ ├── ActorProperty.cs.meta │ │ │ │ ├── CheckProperty.cs │ │ │ │ ├── CheckProperty.cs.meta │ │ │ │ ├── TriggerProperty.cs │ │ │ │ └── TriggerProperty.cs.meta │ │ │ ├── Properties.meta │ │ │ ├── SerializedEdge.cs │ │ │ ├── SerializedEdge.cs.meta │ │ │ ├── SerializedNode.cs │ │ │ ├── SerializedNode.cs.meta │ │ │ ├── SerializedProperty.cs │ │ │ ├── SerializedProperty.cs.meta │ │ │ ├── VersionMismatchObject.cs │ │ │ └── VersionMismatchObject.cs.meta │ │ ├── Data.meta │ │ ├── Nodes/ │ │ │ ├── AbstractNode.cs │ │ │ ├── AbstractNode.cs.meta │ │ │ ├── Boolean/ │ │ │ │ ├── BinaryBooleanNode.cs │ │ │ │ ├── BinaryBooleanNode.cs.meta │ │ │ │ ├── BooleanNodes.cs │ │ │ │ ├── BooleanNodes.cs.meta │ │ │ │ ├── UnaryBooleanNode.cs │ │ │ │ └── UnaryBooleanNode.cs.meta │ │ │ ├── Boolean.meta │ │ │ ├── NodeColors.cs │ │ │ ├── NodeColors.cs.meta │ │ │ ├── NpcNode.cs │ │ │ ├── NpcNode.cs.meta │ │ │ ├── Port/ │ │ │ │ ├── DlogPort.cs │ │ │ │ ├── DlogPort.cs.meta │ │ │ │ ├── PortHelper.cs │ │ │ │ ├── PortHelper.cs.meta │ │ │ │ ├── PortType.cs │ │ │ │ └── PortType.cs.meta │ │ │ ├── Port.meta │ │ │ ├── PropertyNode.cs │ │ │ ├── PropertyNode.cs.meta │ │ │ ├── SelfNode.cs │ │ │ └── SelfNode.cs.meta │ │ ├── Nodes.meta │ │ ├── Views/ │ │ │ ├── Blackboard/ │ │ │ │ ├── BlackboardPropertyView.cs │ │ │ │ ├── BlackboardPropertyView.cs.meta │ │ │ │ ├── BlackboardProvider.cs │ │ │ │ └── BlackboardProvider.cs.meta │ │ │ ├── Blackboard.meta │ │ │ ├── DlogEditorWindow.cs │ │ │ ├── DlogEditorWindow.cs.meta │ │ │ ├── DlogGraphView.cs │ │ │ ├── DlogGraphView.cs.meta │ │ │ ├── DlogWindowEvents.cs │ │ │ ├── DlogWindowEvents.cs.meta │ │ │ ├── EdgeConnectorListener.cs │ │ │ ├── EdgeConnectorListener.cs.meta │ │ │ ├── EditorView.cs │ │ │ ├── EditorView.cs.meta │ │ │ ├── SearchWindow/ │ │ │ │ ├── SearchWindowAdapter.cs │ │ │ │ ├── SearchWindowAdapter.cs.meta │ │ │ │ ├── SearchWindowProvider.cs │ │ │ │ └── SearchWindowProvider.cs.meta │ │ │ └── SearchWindow.meta │ │ └── Views.meta │ ├── Graph.meta │ ├── Importers/ │ │ ├── DlogGraphAssetPostProcessor.cs │ │ ├── DlogGraphAssetPostProcessor.cs.meta │ │ ├── DlogGraphImporter.cs │ │ ├── DlogGraphImporter.cs.meta │ │ ├── DlogGraphImporterEditor.cs │ │ └── DlogGraphImporterEditor.cs.meta │ ├── Importers.meta │ ├── Inspector/ │ │ ├── DlogObjectEditor.cs │ │ └── DlogObjectEditor.cs.meta │ ├── Inspector.meta │ ├── Util/ │ │ ├── DialogueGraphUtility.cs │ │ ├── DialogueGraphUtility.cs.meta │ │ ├── Ref.cs │ │ ├── Ref.cs.meta │ │ ├── ResourcesUtility.cs │ │ ├── ResourcesUtility.cs.meta │ │ ├── UIElementsFactory.cs │ │ ├── UIElementsFactory.cs.meta │ │ ├── Versioning/ │ │ │ ├── Conversion/ │ │ │ │ ├── ConvertMethodAttribute.cs │ │ │ │ ├── ConvertMethodAttribute.cs.meta │ │ │ │ ├── VersionConverter.cs │ │ │ │ └── VersionConverter.cs.meta │ │ │ ├── Conversion.meta │ │ │ ├── SemVer.cs │ │ │ └── SemVer.cs.meta │ │ └── Versioning.meta │ └── Util.meta ├── Editor.meta ├── Github~/ │ ├── CODE_OF_CONDUCT.md │ └── CONTRIBUTING.md ├── LICENSE.md ├── LICENSE.md.meta ├── README.md ├── README.md.meta ├── Resources/ │ ├── Inspector/ │ │ ├── ActorEditor.uxml │ │ ├── ActorEditor.uxml.meta │ │ ├── CheckEditor.uxml │ │ ├── CheckEditor.uxml.meta │ │ ├── DlogObjectEditor.uxml │ │ ├── DlogObjectEditor.uxml.meta │ │ ├── Styles/ │ │ │ ├── ActorEditor.uss │ │ │ ├── ActorEditor.uss.meta │ │ │ ├── CheckEditor.uss │ │ │ ├── CheckEditor.uss.meta │ │ │ ├── DlogObjectEditor.uss │ │ │ ├── DlogObjectEditor.uss.meta │ │ │ ├── TriggerEditor.uss │ │ │ └── TriggerEditor.uss.meta │ │ ├── Styles.meta │ │ ├── TriggerEditor.uxml │ │ └── TriggerEditor.uxml.meta │ ├── Inspector.meta │ ├── Styles/ │ │ ├── Graph.uss │ │ ├── Graph.uss.meta │ │ ├── Node/ │ │ │ ├── BooleanNode.uss │ │ │ ├── BooleanNode.uss.meta │ │ │ ├── CombinerNode.uss │ │ │ ├── CombinerNode.uss.meta │ │ │ ├── Node.uss │ │ │ ├── Node.uss.meta │ │ │ ├── Port.uss │ │ │ └── Port.uss.meta │ │ ├── Node.meta │ │ ├── PropertyView/ │ │ │ ├── Blackboard.uss │ │ │ ├── Blackboard.uss.meta │ │ │ ├── ReferenceNameField.uss │ │ │ └── ReferenceNameField.uss.meta │ │ └── PropertyView.meta │ ├── Styles.meta │ ├── Textures/ │ │ ├── boolean/ │ │ │ ├── AND.png.meta │ │ │ ├── NAND.png.meta │ │ │ ├── NOR.png.meta │ │ │ ├── NOT.png.meta │ │ │ ├── OR.png.meta │ │ │ ├── XNOR.png.meta │ │ │ └── XOR.png.meta │ │ ├── boolean.meta │ │ ├── checkCombinerBackgroundAnd.png.meta │ │ ├── checkCombinerBackgroundOr.png.meta │ │ ├── dloggraph_256.png.meta │ │ ├── dloggraph_error_256.psd │ │ ├── dloggraph_error_256.psd.meta │ │ └── dloggraph_runtime_256.png.meta │ └── Textures.meta ├── Resources.meta ├── Runtime/ │ ├── Data/ │ │ ├── ActorData.cs │ │ ├── ActorData.cs.meta │ │ ├── BooleanOperation.cs │ │ ├── BooleanOperation.cs.meta │ │ ├── CheckTree.cs │ │ ├── CheckTree.cs.meta │ │ ├── ConversationLine.cs │ │ ├── ConversationLine.cs.meta │ │ ├── DlogObject.cs │ │ ├── DlogObject.cs.meta │ │ ├── Edge.cs │ │ ├── Edge.cs.meta │ │ ├── Node.cs │ │ ├── Node.cs.meta │ │ ├── Properties/ │ │ │ ├── Property.cs │ │ │ ├── Property.cs.meta │ │ │ ├── PropertyType.cs │ │ │ └── PropertyType.cs.meta │ │ └── Properties.meta │ ├── Data.meta │ ├── DialogueGraph.Runtime.asmdef │ ├── DialogueGraph.Runtime.asmdef.meta │ ├── DlogObjectData.cs │ ├── DlogObjectData.cs.meta │ ├── GenericDataTypes.cs │ ├── GenericDataTypes.cs.meta │ ├── RuntimeDialogueGraph.cs │ └── RuntimeDialogueGraph.cs.meta ├── Runtime.meta ├── Samples~/ │ ├── DemoProject/ │ │ ├── Example.dlog │ │ ├── Example.dlog.meta │ │ ├── Prefabs/ │ │ │ ├── Line Entry.prefab │ │ │ └── Line Entry.prefab.meta │ │ ├── Prefabs.meta │ │ ├── Scenes/ │ │ │ ├── Demo.unity │ │ │ ├── Demo.unity.meta │ │ │ ├── DemoLightingSettings.lighting │ │ │ └── DemoLightingSettings.lighting.meta │ │ ├── Scenes.meta │ │ ├── Scripts/ │ │ │ ├── LineController.cs │ │ │ ├── LineController.cs.meta │ │ │ ├── LineEntry.cs │ │ │ ├── LineEntry.cs.meta │ │ │ ├── NPCDialogue.cs │ │ │ └── NPCDialogue.cs.meta │ │ ├── Scripts.meta │ │ ├── Sprites/ │ │ │ └── Square.png.meta │ │ └── Sprites.meta │ └── DemoProject.meta ├── package.json └── package.json.meta
SYMBOL INDEX (512 symbols across 77 files)
FILE: Dependencies/SerializableCallback/Editor/SerializableCallbackDrawer.cs
class SerializableCallbackDrawer (line 10) | [CustomPropertyDrawer(typeof(TargetConstraintAttribute))]
method OnGUI (line 14) | public override void OnGUI(Rect position, SerializedProperty property,...
class MenuItem (line 135) | private class MenuItem {
method MenuItem (line 140) | public MenuItem(string path, string name, GenericMenu.MenuFunction a...
method MethodSelector (line 146) | void MethodSelector(SerializedProperty property) {
method PrettifyMethod (line 240) | string PrettifyMethod(string methodName, Type[] parmTypes) {
method PrettifyMethod (line 245) | string PrettifyMethod(MethodInfo methodInfo) {
method PrettifyTypes (line 252) | string PrettifyTypes(Type[] types) {
method GetMethod (line 257) | MethodInfo GetMethod(object target, string methodName, Type[] types) {
method GetArgTypes (line 262) | private Type[] GetArgTypes(SerializedProperty argsProp) {
method SetMethod (line 273) | private void SetMethod(SerializedProperty property, UnityEngine.Object...
method GetTypeName (line 292) | private static string GetTypeName(Type t) {
method GetPropertyHeight (line 301) | public override float GetPropertyHeight(SerializedProperty property, G...
method GetDummyFunction (line 313) | private static SerializableCallbackBase GetDummyFunction(SerializedPro...
FILE: Dependencies/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs
class TargetConstraintAttribute (line 5) | public class TargetConstraintAttribute : PropertyAttribute {
method TargetConstraintAttribute (line 9) | public TargetConstraintAttribute(Type targetType) {
FILE: Dependencies/SerializableCallback/Runtime/InvokableCallback.cs
class InvokableCallback (line 6) | public class InvokableCallback<TReturn> : InvokableCallbackBase<TReturn> {
method Invoke (line 10) | public TReturn Invoke() {
method Invoke (line 14) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 19) | public InvokableCallback(object target, string methodName) {
method Invoke (line 32) | public TReturn Invoke(T0 arg0) {
method Invoke (line 36) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 43) | public InvokableCallback(object target, string methodName) {
method Invoke (line 56) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Invoke (line 60) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 68) | public InvokableCallback(object target, string methodName) {
method Invoke (line 81) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 85) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 94) | public InvokableCallback(object target, string methodName) {
method Invoke (line 107) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 111) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 121) | public InvokableCallback(object target, string methodName) {
class InvokableCallback (line 28) | public class InvokableCallback<T0, TReturn> : InvokableCallbackBase<TRet...
method Invoke (line 10) | public TReturn Invoke() {
method Invoke (line 14) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 19) | public InvokableCallback(object target, string methodName) {
method Invoke (line 32) | public TReturn Invoke(T0 arg0) {
method Invoke (line 36) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 43) | public InvokableCallback(object target, string methodName) {
method Invoke (line 56) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Invoke (line 60) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 68) | public InvokableCallback(object target, string methodName) {
method Invoke (line 81) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 85) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 94) | public InvokableCallback(object target, string methodName) {
method Invoke (line 107) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 111) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 121) | public InvokableCallback(object target, string methodName) {
class InvokableCallback (line 52) | public class InvokableCallback<T0, T1, TReturn> : InvokableCallbackBase<...
method Invoke (line 10) | public TReturn Invoke() {
method Invoke (line 14) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 19) | public InvokableCallback(object target, string methodName) {
method Invoke (line 32) | public TReturn Invoke(T0 arg0) {
method Invoke (line 36) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 43) | public InvokableCallback(object target, string methodName) {
method Invoke (line 56) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Invoke (line 60) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 68) | public InvokableCallback(object target, string methodName) {
method Invoke (line 81) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 85) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 94) | public InvokableCallback(object target, string methodName) {
method Invoke (line 107) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 111) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 121) | public InvokableCallback(object target, string methodName) {
class InvokableCallback (line 77) | public class InvokableCallback<T0, T1, T2, TReturn> : InvokableCallbackB...
method Invoke (line 10) | public TReturn Invoke() {
method Invoke (line 14) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 19) | public InvokableCallback(object target, string methodName) {
method Invoke (line 32) | public TReturn Invoke(T0 arg0) {
method Invoke (line 36) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 43) | public InvokableCallback(object target, string methodName) {
method Invoke (line 56) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Invoke (line 60) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 68) | public InvokableCallback(object target, string methodName) {
method Invoke (line 81) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 85) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 94) | public InvokableCallback(object target, string methodName) {
method Invoke (line 107) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 111) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 121) | public InvokableCallback(object target, string methodName) {
class InvokableCallback (line 103) | public class InvokableCallback<T0, T1, T2, T3, TReturn> : InvokableCallb...
method Invoke (line 10) | public TReturn Invoke() {
method Invoke (line 14) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 19) | public InvokableCallback(object target, string methodName) {
method Invoke (line 32) | public TReturn Invoke(T0 arg0) {
method Invoke (line 36) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 43) | public InvokableCallback(object target, string methodName) {
method Invoke (line 56) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Invoke (line 60) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 68) | public InvokableCallback(object target, string methodName) {
method Invoke (line 81) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 85) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 94) | public InvokableCallback(object target, string methodName) {
method Invoke (line 107) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 111) | public override TReturn Invoke(params object[] args) {
method InvokableCallback (line 121) | public InvokableCallback(object target, string methodName) {
FILE: Dependencies/SerializableCallback/Runtime/InvokableCallbackBase.cs
class InvokableCallbackBase (line 1) | public abstract class InvokableCallbackBase<TReturn> {
method Invoke (line 2) | public abstract TReturn Invoke(params object[] args);
FILE: Dependencies/SerializableCallback/Runtime/InvokableEvent.cs
class InvokableEvent (line 3) | public class InvokableEvent : InvokableEventBase {
method Invoke (line 7) | public void Invoke() {
method Invoke (line 11) | public override void Invoke(params object[] args) {
method InvokableEvent (line 16) | public InvokableEvent(object target, string methodName) {
method Invoke (line 29) | public void Invoke(T0 arg0) {
method Invoke (line 33) | public override void Invoke(params object[] args) {
method InvokableEvent (line 38) | public InvokableEvent(object target, string methodName) {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Invoke (line 55) | public override void Invoke(params object[] args) {
method InvokableEvent (line 60) | public InvokableEvent(object target, string methodName) {
method Invoke (line 73) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 77) | public override void Invoke(params object[] args) {
method InvokableEvent (line 82) | public InvokableEvent(object target, string methodName) {
method Invoke (line 95) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 99) | public override void Invoke(params object[] args) {
method InvokableEvent (line 104) | public InvokableEvent(object target, string methodName) {
class InvokableEvent (line 25) | public class InvokableEvent<T0> : InvokableEventBase {
method Invoke (line 7) | public void Invoke() {
method Invoke (line 11) | public override void Invoke(params object[] args) {
method InvokableEvent (line 16) | public InvokableEvent(object target, string methodName) {
method Invoke (line 29) | public void Invoke(T0 arg0) {
method Invoke (line 33) | public override void Invoke(params object[] args) {
method InvokableEvent (line 38) | public InvokableEvent(object target, string methodName) {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Invoke (line 55) | public override void Invoke(params object[] args) {
method InvokableEvent (line 60) | public InvokableEvent(object target, string methodName) {
method Invoke (line 73) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 77) | public override void Invoke(params object[] args) {
method InvokableEvent (line 82) | public InvokableEvent(object target, string methodName) {
method Invoke (line 95) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 99) | public override void Invoke(params object[] args) {
method InvokableEvent (line 104) | public InvokableEvent(object target, string methodName) {
class InvokableEvent (line 47) | public class InvokableEvent<T0, T1> : InvokableEventBase {
method Invoke (line 7) | public void Invoke() {
method Invoke (line 11) | public override void Invoke(params object[] args) {
method InvokableEvent (line 16) | public InvokableEvent(object target, string methodName) {
method Invoke (line 29) | public void Invoke(T0 arg0) {
method Invoke (line 33) | public override void Invoke(params object[] args) {
method InvokableEvent (line 38) | public InvokableEvent(object target, string methodName) {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Invoke (line 55) | public override void Invoke(params object[] args) {
method InvokableEvent (line 60) | public InvokableEvent(object target, string methodName) {
method Invoke (line 73) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 77) | public override void Invoke(params object[] args) {
method InvokableEvent (line 82) | public InvokableEvent(object target, string methodName) {
method Invoke (line 95) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 99) | public override void Invoke(params object[] args) {
method InvokableEvent (line 104) | public InvokableEvent(object target, string methodName) {
class InvokableEvent (line 69) | public class InvokableEvent<T0, T1, T2> : InvokableEventBase {
method Invoke (line 7) | public void Invoke() {
method Invoke (line 11) | public override void Invoke(params object[] args) {
method InvokableEvent (line 16) | public InvokableEvent(object target, string methodName) {
method Invoke (line 29) | public void Invoke(T0 arg0) {
method Invoke (line 33) | public override void Invoke(params object[] args) {
method InvokableEvent (line 38) | public InvokableEvent(object target, string methodName) {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Invoke (line 55) | public override void Invoke(params object[] args) {
method InvokableEvent (line 60) | public InvokableEvent(object target, string methodName) {
method Invoke (line 73) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 77) | public override void Invoke(params object[] args) {
method InvokableEvent (line 82) | public InvokableEvent(object target, string methodName) {
method Invoke (line 95) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 99) | public override void Invoke(params object[] args) {
method InvokableEvent (line 104) | public InvokableEvent(object target, string methodName) {
class InvokableEvent (line 91) | public class InvokableEvent<T0, T1, T2, T3> : InvokableEventBase {
method Invoke (line 7) | public void Invoke() {
method Invoke (line 11) | public override void Invoke(params object[] args) {
method InvokableEvent (line 16) | public InvokableEvent(object target, string methodName) {
method Invoke (line 29) | public void Invoke(T0 arg0) {
method Invoke (line 33) | public override void Invoke(params object[] args) {
method InvokableEvent (line 38) | public InvokableEvent(object target, string methodName) {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Invoke (line 55) | public override void Invoke(params object[] args) {
method InvokableEvent (line 60) | public InvokableEvent(object target, string methodName) {
method Invoke (line 73) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Invoke (line 77) | public override void Invoke(params object[] args) {
method InvokableEvent (line 82) | public InvokableEvent(object target, string methodName) {
method Invoke (line 95) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Invoke (line 99) | public override void Invoke(params object[] args) {
method InvokableEvent (line 104) | public InvokableEvent(object target, string methodName) {
FILE: Dependencies/SerializableCallback/Runtime/InvokableEventBase.cs
class InvokableEventBase (line 1) | public abstract class InvokableEventBase {
method Invoke (line 2) | public abstract void Invoke(params object[] args);
FILE: Dependencies/SerializableCallback/Runtime/SerializableCallback.cs
class SerializableCallback (line 6) | public abstract class SerializableCallback<TReturn> : SerializableCallba...
method Invoke (line 7) | public TReturn Invoke() {
method Cache (line 17) | protected override void Cache() {
method Invoke (line 31) | public TReturn Invoke(T0 arg0) {
method Cache (line 41) | protected override void Cache() {
method Invoke (line 55) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Cache (line 65) | protected override void Cache() {
method Invoke (line 79) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 89) | protected override void Cache() {
method Invoke (line 103) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 113) | protected override void Cache() {
class SerializableCallback (line 30) | public abstract class SerializableCallback<T0, TReturn> : SerializableCa...
method Invoke (line 7) | public TReturn Invoke() {
method Cache (line 17) | protected override void Cache() {
method Invoke (line 31) | public TReturn Invoke(T0 arg0) {
method Cache (line 41) | protected override void Cache() {
method Invoke (line 55) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Cache (line 65) | protected override void Cache() {
method Invoke (line 79) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 89) | protected override void Cache() {
method Invoke (line 103) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 113) | protected override void Cache() {
class SerializableCallback (line 54) | public abstract class SerializableCallback<T0, T1, TReturn> : Serializab...
method Invoke (line 7) | public TReturn Invoke() {
method Cache (line 17) | protected override void Cache() {
method Invoke (line 31) | public TReturn Invoke(T0 arg0) {
method Cache (line 41) | protected override void Cache() {
method Invoke (line 55) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Cache (line 65) | protected override void Cache() {
method Invoke (line 79) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 89) | protected override void Cache() {
method Invoke (line 103) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 113) | protected override void Cache() {
class SerializableCallback (line 78) | public abstract class SerializableCallback<T0, T1, T2, TReturn> : Serial...
method Invoke (line 7) | public TReturn Invoke() {
method Cache (line 17) | protected override void Cache() {
method Invoke (line 31) | public TReturn Invoke(T0 arg0) {
method Cache (line 41) | protected override void Cache() {
method Invoke (line 55) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Cache (line 65) | protected override void Cache() {
method Invoke (line 79) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 89) | protected override void Cache() {
method Invoke (line 103) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 113) | protected override void Cache() {
class SerializableCallback (line 102) | public abstract class SerializableCallback<T0, T1, T2, T3, TReturn> : Se...
method Invoke (line 7) | public TReturn Invoke() {
method Cache (line 17) | protected override void Cache() {
method Invoke (line 31) | public TReturn Invoke(T0 arg0) {
method Cache (line 41) | protected override void Cache() {
method Invoke (line 55) | public TReturn Invoke(T0 arg0, T1 arg1) {
method Cache (line 65) | protected override void Cache() {
method Invoke (line 79) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 89) | protected override void Cache() {
method Invoke (line 103) | public TReturn Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 113) | protected override void Cache() {
FILE: Dependencies/SerializableCallback/Runtime/SerializableCallbackBase.cs
class SerializableCallbackBase (line 9) | public abstract class SerializableCallbackBase<TReturn> : SerializableCa...
method ClearCache (line 12) | public override void ClearCache() {
method GetPersistentMethod (line 17) | protected InvokableCallbackBase<TReturn> GetPersistentMethod() {
method SerializableCallbackBase (line 73) | protected SerializableCallbackBase() {
method ClearCache (line 78) | public virtual void ClearCache() {
method SetMethod (line 83) | public void SetMethod(Object target, string methodName, bool dynamic, ...
method Cache (line 91) | protected abstract void Cache();
method OnBeforeSerialize (line 93) | public void OnBeforeSerialize() {
method OnAfterDeserialize (line 99) | public void OnAfterDeserialize() {
class SerializableCallbackBase (line 47) | [System.Serializable]
method ClearCache (line 12) | public override void ClearCache() {
method GetPersistentMethod (line 17) | protected InvokableCallbackBase<TReturn> GetPersistentMethod() {
method SerializableCallbackBase (line 73) | protected SerializableCallbackBase() {
method ClearCache (line 78) | public virtual void ClearCache() {
method SetMethod (line 83) | public void SetMethod(Object target, string methodName, bool dynamic, ...
method Cache (line 91) | protected abstract void Cache();
method OnBeforeSerialize (line 93) | public void OnBeforeSerialize() {
method OnAfterDeserialize (line 99) | public void OnAfterDeserialize() {
type Arg (line 106) | [System.Serializable]
type ArgType (line 108) | public enum ArgType { Unsupported, Bool, Int, Float, String, Object }
method GetValue (line 117) | public object GetValue() {
method GetValue (line 121) | public object GetValue(ArgType type) {
method RealType (line 138) | public static Type RealType(ArgType type) {
method FromRealType (line 155) | public static ArgType FromRealType(Type type) {
method IsSupported (line 164) | public static bool IsSupported(Type type) {
FILE: Dependencies/SerializableCallback/Runtime/SerializableEvent.cs
class SerializableEvent (line 1) | [System.Serializable]
method Invoke (line 3) | public void Invoke() {
method Cache (line 13) | protected override void Cache() {
method Invoke (line 27) | public void Invoke(T0 arg0) {
method Cache (line 37) | protected override void Cache() {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Cache (line 61) | protected override void Cache() {
method Invoke (line 75) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 85) | protected override void Cache() {
method Invoke (line 99) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 109) | protected override void Cache() {
class SerializableEvent (line 26) | public abstract class SerializableEvent<T0> : SerializableEventBase {
method Invoke (line 3) | public void Invoke() {
method Cache (line 13) | protected override void Cache() {
method Invoke (line 27) | public void Invoke(T0 arg0) {
method Cache (line 37) | protected override void Cache() {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Cache (line 61) | protected override void Cache() {
method Invoke (line 75) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 85) | protected override void Cache() {
method Invoke (line 99) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 109) | protected override void Cache() {
class SerializableEvent (line 50) | public abstract class SerializableEvent<T0, T1> : SerializableEventBase {
method Invoke (line 3) | public void Invoke() {
method Cache (line 13) | protected override void Cache() {
method Invoke (line 27) | public void Invoke(T0 arg0) {
method Cache (line 37) | protected override void Cache() {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Cache (line 61) | protected override void Cache() {
method Invoke (line 75) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 85) | protected override void Cache() {
method Invoke (line 99) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 109) | protected override void Cache() {
class SerializableEvent (line 74) | public abstract class SerializableEvent<T0, T1, T2> : SerializableEventB...
method Invoke (line 3) | public void Invoke() {
method Cache (line 13) | protected override void Cache() {
method Invoke (line 27) | public void Invoke(T0 arg0) {
method Cache (line 37) | protected override void Cache() {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Cache (line 61) | protected override void Cache() {
method Invoke (line 75) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 85) | protected override void Cache() {
method Invoke (line 99) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 109) | protected override void Cache() {
class SerializableEvent (line 98) | public abstract class SerializableEvent<T0, T1, T2, T3> : SerializableEv...
method Invoke (line 3) | public void Invoke() {
method Cache (line 13) | protected override void Cache() {
method Invoke (line 27) | public void Invoke(T0 arg0) {
method Cache (line 37) | protected override void Cache() {
method Invoke (line 51) | public void Invoke(T0 arg0, T1 arg1) {
method Cache (line 61) | protected override void Cache() {
method Invoke (line 75) | public void Invoke(T0 arg0, T1 arg1, T2 arg2) {
method Cache (line 85) | protected override void Cache() {
method Invoke (line 99) | public void Invoke(T0 arg0, T1 arg1, T2 arg2, T3 arg3) {
method Cache (line 109) | protected override void Cache() {
FILE: Dependencies/SerializableCallback/Runtime/SerializableEventBase.cs
class SerializableEventBase (line 6) | public abstract class SerializableEventBase : SerializableCallbackBase {
method ClearCache (line 9) | public override void ClearCache() {
method GetPersistentMethod (line 14) | protected InvokableEventBase GetPersistentMethod() {
FILE: Dependencies/SerializableCallback/Runtime/Test.cs
class Test (line 5) | public class Test : MonoBehaviour {
method Start (line 14) | void Start() {
method Update (line 20) | void Update() {
method TestMethod (line 62) | public bool TestMethod(float f) {
method TestMethod (line 66) | public bool TestMethod(string a) {
method TestMethod2 (line 70) | public bool TestMethod2(float f, string a) {
method TestMethod2 (line 74) | public void TestMethod2(string a) {
class Condition (line 79) | [Serializable]
FILE: Dependencies/SerializableDictionary/Editor/SerializableDictionaryPropertyDrawer.cs
class SerializableDictionaryPropertyDrawer (line 8) | public class SerializableDictionaryPropertyDrawer : PropertyDrawer
class ConflictState (line 23) | class ConflictState
type PropertyIdentity (line 34) | struct PropertyIdentity
method PropertyIdentity (line 36) | public PropertyIdentity(SerializedProperty property)
type Action (line 48) | enum Action
method OnGUI (line 55) | public override void OnGUI(Rect position, SerializedProperty property,...
method DrawKeyValueLine (line 208) | static float DrawKeyValueLine(SerializedProperty keyProperty, Serializ...
method DrawKeyValueLineSimple (line 225) | static float DrawKeyValueLineSimple(SerializedProperty keyProperty, Se...
method DrawKeyValueLineExpand (line 251) | static float DrawKeyValueLineExpand(SerializedProperty keyProperty, Se...
method CanPropertyBeExpanded (line 271) | static bool CanPropertyBeExpanded(SerializedProperty property)
method SaveProperty (line 284) | static void SaveProperty(SerializedProperty keyProperty, SerializedPro...
method GetPropertyHeight (line 298) | public override float GetPropertyHeight(SerializedProperty property, G...
method GetConflictState (line 328) | static ConflictState GetConflictState(SerializedProperty property)
method SerializableDictionaryPropertyDrawer (line 342) | static SerializableDictionaryPropertyDrawer()
method IconContent (line 375) | static GUIContent IconContent(string name, string tooltip)
method TempContent (line 381) | static GUIContent TempContent(string text)
method DeleteArrayElementAtIndex (line 387) | static void DeleteArrayElementAtIndex(SerializedProperty arrayProperty...
method GetPropertyValue (line 399) | public static object GetPropertyValue(SerializedProperty p)
method SetPropertyValue (line 415) | static void SetPropertyValue(SerializedProperty p, object v)
method GetPropertyValueArray (line 431) | static object GetPropertyValueArray(SerializedProperty property)
method GetPropertyValueGeneric (line 442) | static object GetPropertyValueGeneric(SerializedProperty property)
method SetPropertyValueArray (line 459) | static void SetPropertyValueArray(SerializedProperty property, object v)
method SetPropertyValueGeneric (line 470) | static void SetPropertyValueGeneric(SerializedProperty property, objec...
method ComparePropertyValues (line 485) | static bool ComparePropertyValues(object value1, object value2)
method CompareDictionaries (line 499) | static bool CompareDictionaries(Dictionary<string, object> dict1, Dict...
type EnumerationEntry (line 520) | struct EnumerationEntry
method EnumerationEntry (line 526) | public EnumerationEntry(SerializedProperty keyProperty, SerializedPr...
method EnumerateEntries (line 534) | static IEnumerable<EnumerationEntry> EnumerateEntries(SerializedProper...
class SerializableDictionaryStoragePropertyDrawer (line 552) | public class SerializableDictionaryStoragePropertyDrawer : PropertyDrawer
method OnGUI (line 554) | public override void OnGUI(Rect position, SerializedProperty property,...
method GetPropertyHeight (line 560) | public override float GetPropertyHeight(SerializedProperty property, G...
FILE: Dependencies/SerializableDictionary/Runtime/SerializableDictionary.cs
class SerializableDictionaryBase (line 7) | public abstract class SerializableDictionaryBase<TKey, TValue, TValueSto...
method SerializableDictionaryBase (line 14) | public SerializableDictionaryBase()
method SerializableDictionaryBase (line 18) | public SerializableDictionaryBase(IDictionary<TKey, TValue> dict) : ba...
method SerializableDictionaryBase (line 26) | protected SerializableDictionaryBase(SerializationInfo info, Streaming...
method SetValue (line 28) | protected abstract void SetValue(TValueStorage[] storage, int i, TValu...
method GetValue (line 29) | protected abstract TValue GetValue(TValueStorage[] storage, int i);
method CopyFrom (line 31) | public void CopyFrom(IDictionary<TKey, TValue> dict)
method OnAfterDeserialize (line 40) | public void OnAfterDeserialize()
method OnBeforeSerialize (line 57) | public void OnBeforeSerialize()
class SerializableDictionary (line 73) | public class SerializableDictionary<TKey, TValue> : SerializableDictiona...
method SerializableDictionary (line 75) | public SerializableDictionary()
method SerializableDictionary (line 79) | public SerializableDictionary(IDictionary<TKey, TValue> dict) : base(d...
method SerializableDictionary (line 83) | protected SerializableDictionary(SerializationInfo info, StreamingCont...
method GetValue (line 85) | protected override TValue GetValue(TValue[] storage, int i)
method SetValue (line 90) | protected override void SetValue(TValue[] storage, int i, TValue value)
class Storage (line 98) | public class Storage<T>
method SerializableDictionary (line 106) | public SerializableDictionary()
method SerializableDictionary (line 110) | public SerializableDictionary(IDictionary<TKey, TValue> dict) : base(d...
method SerializableDictionary (line 114) | protected SerializableDictionary(SerializationInfo info, StreamingCont...
method GetValue (line 116) | protected override TValue GetValue(TValueStorage[] storage, int i)
method SetValue (line 121) | protected override void SetValue(TValueStorage[] storage, int i, TValu...
class SerializableDictionary (line 96) | public static class SerializableDictionary
method SerializableDictionary (line 75) | public SerializableDictionary()
method SerializableDictionary (line 79) | public SerializableDictionary(IDictionary<TKey, TValue> dict) : base(d...
method SerializableDictionary (line 83) | protected SerializableDictionary(SerializationInfo info, StreamingCont...
method GetValue (line 85) | protected override TValue GetValue(TValue[] storage, int i)
method SetValue (line 90) | protected override void SetValue(TValue[] storage, int i, TValue value)
class Storage (line 98) | public class Storage<T>
method SerializableDictionary (line 106) | public SerializableDictionary()
method SerializableDictionary (line 110) | public SerializableDictionary(IDictionary<TKey, TValue> dict) : base(d...
method SerializableDictionary (line 114) | protected SerializableDictionary(SerializationInfo info, StreamingCont...
method GetValue (line 116) | protected override TValue GetValue(TValueStorage[] storage, int i)
method SetValue (line 121) | protected override void SetValue(TValueStorage[] storage, int i, TValu...
class SerializableDictionary (line 104) | public class SerializableDictionary<TKey, TValue, TValueStorage> : Seria...
method SerializableDictionary (line 75) | public SerializableDictionary()
method SerializableDictionary (line 79) | public SerializableDictionary(IDictionary<TKey, TValue> dict) : base(d...
method SerializableDictionary (line 83) | protected SerializableDictionary(SerializationInfo info, StreamingCont...
method GetValue (line 85) | protected override TValue GetValue(TValue[] storage, int i)
method SetValue (line 90) | protected override void SetValue(TValue[] storage, int i, TValue value)
class Storage (line 98) | public class Storage<T>
method SerializableDictionary (line 106) | public SerializableDictionary()
method SerializableDictionary (line 110) | public SerializableDictionary(IDictionary<TKey, TValue> dict) : base(d...
method SerializableDictionary (line 114) | protected SerializableDictionary(SerializationInfo info, StreamingCont...
method GetValue (line 116) | protected override TValue GetValue(TValueStorage[] storage, int i)
method SetValue (line 121) | protected override void SetValue(TValueStorage[] storage, int i, TValu...
FILE: Editor/AssetCallbacks/CreateDlogGraph.cs
class CreateDlogGraph (line 6) | internal class CreateDlogGraph : EndNameEditAction {
method CreateDialogueGraph (line 7) | [MenuItem("Assets/Create/Dialogue Graph/Empty Dialogue Graph", false, 1)]
method Action (line 13) | public override void Action(int instanceId, string pathName, string re...
FILE: Editor/Extensions/DlogExtensions.cs
class DlogExtensions (line 5) | public static class DlogExtensions {
method Deserialize (line 6) | public static AbstractProperty Deserialize(this SerializedProperty pro...
method InjectCustomStyle (line 11) | public static void InjectCustomStyle(this DlogPort port) {
FILE: Editor/Extensions/GUILayoutHelper.cs
class GUILayoutHelper (line 5) | public static class GUILayoutHelper {
method BeginCenterVertically (line 6) | public static void BeginCenterVertically() {
method EndCenterVertically (line 12) | public static void EndCenterVertically() {
method CenterVertically (line 18) | public static void CenterVertically(Action drawGUI) {
FILE: Editor/Extensions/GraphViewExtensions.cs
class GraphViewExtensions (line 10) | public static class GraphViewExtensions {
method InsertCopyPasteData (line 11) | public static void InsertCopyPasteData(this DlogGraphView graphView, C...
FILE: Editor/Extensions/VisualElementExtensions.cs
class VisualElementExtensions (line 5) | public static class VisualElementExtensions {
method AddStyleSheet (line 6) | public static void AddStyleSheet(this VisualElement element, string pa...
FILE: Editor/Graph/Attributes/TitleAttribute.cs
class TitleAttribute (line 4) | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
method TitleAttribute (line 7) | public TitleAttribute(params string[] title) {
FILE: Editor/Graph/Data/CopyPasteData.cs
class CopyPasteData (line 7) | [Serializable]
method CopyPasteData (line 31) | public CopyPasteData(EditorView editorView, IEnumerable<SerializedNode...
method AddNode (line 54) | private void AddNode(SerializedNode node) {
method AddEdge (line 58) | private void AddEdge(SerializedEdge edge) {
method AddProperty (line 61) | private void AddProperty(AbstractProperty property) {
method AddMetaProperty (line 64) | private void AddMetaProperty(AbstractProperty property) {
method OnBeforeSerialize (line 68) | public void OnBeforeSerialize() {
method OnAfterDeserialize (line 90) | public void OnAfterDeserialize() {
method GetAllEdgesForNode (line 109) | private IEnumerable<SerializedEdge> GetAllEdgesForNode(SerializedNode ...
method FromJson (line 117) | public static CopyPasteData FromJson(string json) {
FILE: Editor/Graph/Data/DlogGraphData.cs
class DlogGraphData (line 10) | [Serializable]
method OnBeforeSerialize (line 50) | public void OnBeforeSerialize() {
method OnAfterDeserialize (line 60) | public void OnAfterDeserialize() {
method ClearChanges (line 65) | public void ClearChanges() {
method ReplaceWith (line 77) | public void ReplaceWith(DlogGraphData otherGraphData) {
method AddNode (line 103) | public void AddNode(SerializedNode node) {
method RemoveNode (line 109) | public void RemoveNode(SerializedNode node) {
method HasEdge (line 120) | public bool HasEdge(Edge edge) {
method AddEdge (line 130) | public void AddEdge(Edge edge) {
method AddEdge (line 142) | public void AddEdge(SerializedEdge edge) {
method RemoveEdge (line 161) | public void RemoveEdge(SerializedEdge edge) {
method AddProperty (line 166) | public void AddProperty(AbstractProperty property) {
method RemoveProperty (line 173) | public void RemoveProperty(AbstractProperty property) {
method MoveProperty (line 185) | public void MoveProperty(AbstractProperty property, int newIndex) {
method RemoveElements (line 210) | public void RemoveElements(List<SerializedNode> nodes, List<Serialized...
method QueueSelection (line 220) | public void QueueSelection(List<SerializedNode> nodes, List<Serialized...
method SanitizePropertyName (line 225) | public void SanitizePropertyName(AbstractProperty property) {
method SanitizePropertyReference (line 230) | public void SanitizePropertyReference(AbstractProperty property, strin...
method Paste (line 241) | public void Paste(CopyPasteData copyPasteData, List<SerializedNode> re...
FILE: Editor/Graph/Data/DlogGraphObject.cs
class DlogGraphObject (line 6) | public class DlogGraphObject : ScriptableObject, ISerializationCallbackR...
method Initialize (line 25) | public void Initialize(DlogGraphData dlogData) {
method RegisterCompleteObjectUndo (line 37) | public void RegisterCompleteObjectUndo(string name) {
method OnBeforeSerialize (line 44) | public void OnBeforeSerialize() {
method OnAfterDeserialize (line 51) | public void OnAfterDeserialize() {
method HandleUndoRedo (line 56) | public void HandleUndoRedo() {
method Deserialize (line 66) | private DlogGraphData Deserialize() {
method RecalculateAssetGuid (line 74) | public void RecalculateAssetGuid(string assetPath) {
FILE: Editor/Graph/Data/NodeDrawState.cs
type NodeDrawState (line 5) | [Serializable]
FILE: Editor/Graph/Data/Properties/AbstractProperty.cs
class AbstractProperty (line 6) | [Serializable]
method GetDefaultReferenceName (line 45) | public virtual string GetDefaultReferenceName() {
method Copy (line 59) | public abstract AbstractProperty Copy();
class AbstractProperty (line 62) | [Serializable]
method GetDefaultReferenceName (line 45) | public virtual string GetDefaultReferenceName() {
method Copy (line 59) | public abstract AbstractProperty Copy();
FILE: Editor/Graph/Data/Properties/ActorProperty.cs
class ActorProperty (line 6) | [Serializable]
method ActorProperty (line 8) | public ActorProperty() {
method Copy (line 13) | public override AbstractProperty Copy() {
FILE: Editor/Graph/Data/Properties/CheckProperty.cs
class CheckProperty (line 5) | [Serializable]
method CheckProperty (line 7) | public CheckProperty() {
method Copy (line 12) | public override AbstractProperty Copy() {
FILE: Editor/Graph/Data/Properties/TriggerProperty.cs
class TriggerProperty (line 5) | [Serializable]
method TriggerProperty (line 7) | public TriggerProperty() {
method Copy (line 12) | public override AbstractProperty Copy() {
FILE: Editor/Graph/Data/SerializedEdge.cs
class SerializedEdge (line 7) | [Serializable]
method BuildEdge (line 19) | public void BuildEdge(EditorView editorView) {
FILE: Editor/Graph/Data/SerializedNode.cs
class SerializedNode (line 8) | [Serializable]
method SerializedNode (line 20) | public SerializedNode(Type type, Rect position) {
method BuildNode (line 27) | public void BuildNode(EditorView editorView, EdgeConnectorListener edg...
method BuildPortData (line 44) | public void BuildPortData() {
method OnBeforeSerialize (line 71) | public void OnBeforeSerialize() {
method OnAfterDeserialize (line 78) | public void OnAfterDeserialize() {
FILE: Editor/Graph/Data/SerializedProperty.cs
class SerializedProperty (line 5) | [Serializable]
method SerializedProperty (line 10) | public SerializedProperty(AbstractProperty property) {
FILE: Editor/Graph/Data/VersionMismatchObject.cs
class VersionMismatchObject (line 4) | internal class VersionMismatchObject : ScriptableObject {
FILE: Editor/Graph/Nodes/AbstractNode.cs
class AbstractNode (line 10) | public abstract class AbstractNode : Node {
method AddPort (line 34) | protected void AddPort(Port port, bool alsoAddToHierarchy = true) {
method InitializeNode (line 47) | public virtual void InitializeNode(EdgeConnectorListener edgeConnector...
method Initialize (line 51) | protected void Initialize(string nodeTitle, Rect nodePosition) {
method InjectCustomStyle (line 60) | protected virtual void InjectCustomStyle() {
method Refresh (line 70) | public void Refresh() {
method SetExpandedWithoutNotify (line 75) | public void SetExpandedWithoutNotify(bool value) {
method SetNodeData (line 79) | public virtual void SetNodeData(string jsonData) { }
method GetNodeData (line 81) | public virtual string GetNodeData() {
method OnNodeSerialized (line 86) | public virtual void OnNodeSerialized() { }
method OnNodeDeserialized (line 87) | public virtual void OnNodeDeserialized() { }
FILE: Editor/Graph/Nodes/Boolean/BinaryBooleanNode.cs
class BinaryBooleanNode (line 5) | public abstract class BinaryBooleanNode : AbstractNode {
method InitializeNode (line 9) | public override void InitializeNode(EdgeConnectorListener edgeConnecto...
FILE: Editor/Graph/Nodes/Boolean/BooleanNodes.cs
class NotBooleanNode (line 2) | [Title("Boolean", "NOT")]
class AndBooleanNode (line 8) | [Title("Boolean", "AND")]
class OrBooleanNode (line 14) | [Title("Boolean", "OR")]
class XorBooleanNode (line 20) | [Title("Boolean", "XOR")]
class NandBooleanNode (line 26) | [Title("Boolean", "NAND")]
class NorBooleanNode (line 32) | [Title("Boolean", "NOR")]
class XnorBooleanNode (line 38) | [Title("Boolean", "XNOR")]
FILE: Editor/Graph/Nodes/Boolean/UnaryBooleanNode.cs
class UnaryBooleanNode (line 5) | public abstract class UnaryBooleanNode : AbstractNode {
method InitializeNode (line 9) | public override void InitializeNode(EdgeConnectorListener edgeConnecto...
FILE: Editor/Graph/Nodes/NodeColors.cs
class NodeColors (line 4) | public static class NodeColors {
FILE: Editor/Graph/Nodes/NpcNode.cs
class LineDataNpc (line 14) | public class LineDataNpc {
class NpcNode (line 21) | [Title("NPC")]
method InitializeNode (line 26) | public override void InitializeNode(EdgeConnectorListener edgeConnecto...
method SetNodeData (line 54) | public override void SetNodeData(string jsonData) {
method GetNodeData (line 66) | public override string GetNodeData() {
method AddConversationPort (line 73) | private void AddConversationPort(bool create, int index = -1) {
method RemoveLine (line 146) | private void RemoveLine(int index) {
FILE: Editor/Graph/Nodes/Port/DlogPort.cs
class DlogPort (line 7) | public class DlogPort : Port {
method DlogPort (line 10) | private DlogPort(Orientation portOrientation, Direction portDirection,...
method Create (line 12) | public static DlogPort Create(string name, Orientation portOrientation...
FILE: Editor/Graph/Nodes/Port/PortHelper.cs
class PortHelper (line 7) | public static class PortHelper {
method IsCompatibleWith (line 8) | public static bool IsCompatibleWith(this DlogPort port, DlogPort other) {
method PortColor (line 26) | public static Color PortColor(DlogPort port) {
FILE: Editor/Graph/Nodes/Port/PortType.cs
type PortType (line 4) | public enum PortType {
FILE: Editor/Graph/Nodes/PropertyNode.cs
class PropertyNode (line 9) | public class PropertyNode : AbstractNode {
method InitializeNode (line 29) | public override void InitializeNode(EdgeConnectorListener edgeConnecto...
method GetNodeData (line 36) | public override string GetNodeData() {
method SetNodeData (line 43) | public override void SetNodeData(string jsonData) {
method CreatePorts (line 50) | private void CreatePorts(AbstractProperty property) {
method Update (line 76) | public void Update(AbstractProperty property) {
FILE: Editor/Graph/Nodes/SelfNode.cs
class LineDataSelf (line 11) | public class LineDataSelf {
class SelfNode (line 17) | [Title("Self")]
method InitializeNode (line 23) | public override void InitializeNode(EdgeConnectorListener edgeConnecto...
method SetNodeData (line 46) | public override void SetNodeData(string jsonData) {
method GetNodeData (line 57) | public override string GetNodeData() {
method AddConversationPort (line 64) | private void AddConversationPort(bool create, int index = -1) {
method RemoveLine (line 127) | private void RemoveLine(int index) {
FILE: Editor/Graph/Views/Blackboard/BlackboardPropertyView.cs
class BlackboardPropertyView (line 12) | public class BlackboardPropertyView : VisualElement {
method BlackboardPropertyView (line 29) | public BlackboardPropertyView(BlackboardField field, EditorView editor...
method BuildFields (line 61) | private void BuildFields(AbstractProperty property) {
method UpdateReferenceNameResetMenu (line 82) | private void UpdateReferenceNameResetMenu() {
method BuildContextualMenu (line 92) | private void BuildContextualMenu(ContextualMenuPopulateEvent evt) {
method AddRow (line 100) | public VisualElement AddRow(string labelText, VisualElement control, b...
method Rebuild (line 107) | public void Rebuild() {
method CreateRow (line 112) | private VisualElement CreateRow(string labelText, VisualElement contro...
FILE: Editor/Graph/Views/Blackboard/BlackboardProvider.cs
class BlackboardProvider (line 11) | public class BlackboardProvider {
method BlackboardProvider (line 28) | public BlackboardProvider(EditorView editorView) {
method EditTextRequested (line 48) | private void EditTextRequested(Blackboard blackboard, VisualElement vi...
method MoveItemRequested (line 63) | private void MoveItemRequested(Blackboard blackboard, int newIndex, Vi...
method AddItemRequested (line 71) | private void AddItemRequested(Blackboard blackboard) {
method AddInputRow (line 79) | public void AddInputRow(AbstractProperty property, bool create = false...
method OnExpanded (line 117) | private void OnExpanded(MouseDownEvent evt, AbstractProperty input) {
method OnMouseHover (line 121) | private void OnMouseHover(EventBase evt, AbstractProperty input) {
method OnDragUpdatedEvent (line 138) | private void OnDragUpdatedEvent(DragUpdatedEvent evt) {
method HandleChanges (line 148) | public void HandleChanges() {
FILE: Editor/Graph/Views/DlogEditorWindow.cs
class DlogEditorWindow (line 11) | public class DlogEditorWindow : EditorWindow {
method BuildWindow (line 33) | public void BuildWindow() {
method Update (line 45) | private void Update() {
method DisplayDeletedFromDiskDialog (line 87) | private void DisplayDeletedFromDiskDialog() {
method SetDlogObject (line 100) | public void SetDlogObject(DlogGraphObject dlogObject) {
method Refresh (line 105) | public void Refresh() {
method GraphDeleted (line 119) | public void GraphDeleted() {
method UpdateTitle (line 123) | private void UpdateTitle() {
method OnEnable (line 128) | private void OnEnable() {
method OnDestroy (line 132) | private void OnDestroy() {
method SaveAsset (line 139) | private void SaveAsset() {
method SaveAs (line 145) | private bool SaveAs() {
method ShowInProject (line 174) | private void ShowInProject() {
FILE: Editor/Graph/Views/DlogGraphView.cs
class DlogGraphView (line 9) | public class DlogGraphView : GraphView {
method DlogGraphView (line 14) | public DlogGraphView(EditorView editorView) {
method UnserializeAndPasteImpl (line 25) | private void UnserializeAndPasteImpl(string operation, string data) {
method SerializeGraphElementsImpl (line 31) | private string SerializeGraphElementsImpl(IEnumerable<GraphElement> el...
method BuildContextualMenu (line 45) | public override void BuildContextualMenu(ContextualMenuPopulateEvent e...
method GetCompatiblePorts (line 61) | public override List<Port> GetCompatiblePorts(Port startPort, NodeAdap...
method DeleteSelectionImpl (line 71) | private void DeleteSelectionImpl(string operation, AskUser askUser) {
method OnDragUpdated (line 89) | private void OnDragUpdated(DragUpdatedEvent evt) {
method OnDragPerformed (line 101) | private void OnDragPerformed(DragPerformEvent evt) {
method CreateNode (line 116) | private void CreateNode(object obj, Vector2 nodePosition) {
FILE: Editor/Graph/Views/DlogWindowEvents.cs
class DlogWindowEvents (line 4) | public class DlogWindowEvents {
FILE: Editor/Graph/Views/EdgeConnectorListener.cs
class EdgeConnectorListener (line 7) | public class EdgeConnectorListener : IEdgeConnectorListener {
method EdgeConnectorListener (line 14) | public EdgeConnectorListener(EditorView editorView, SearchWindowProvid...
method OnDropOutsidePort (line 22) | public void OnDropOutsidePort(Edge edge, Vector2 position) {
method OnDrop (line 30) | public void OnDrop(GraphView graphView, Edge edge) {
FILE: Editor/Graph/Views/EditorView.cs
class EditorView (line 12) | public class EditorView : VisualElement, IDisposable {
method EditorView (line 32) | public EditorView(DlogEditorWindow editorWindow) {
method OnGraphViewChanged (line 94) | private GraphViewChange OnGraphViewChanged(GraphViewChange graphViewCh...
method OnKeyDown (line 129) | private void OnKeyDown(KeyDownEvent evt) {
method BuildGraph (line 143) | public void BuildGraph() {
method HandleChanges (line 157) | public void HandleChanges() {
method AddNode (line 185) | public void AddNode(SerializedNode nodeToAdd) {
method RemoveNode (line 190) | public void RemoveNode(SerializedNode nodeToRemove) {
method AddEdge (line 200) | public void AddEdge(SerializedEdge edgeToAdd) {
method RemoveEdge (line 205) | public void RemoveEdge(SerializedEdge edgeToRemove) {
method AddProperty (line 213) | public void AddProperty(AbstractProperty property) {
method Dispose (line 217) | public void Dispose() {
FILE: Editor/Graph/Views/SearchWindow/SearchWindowAdapter.cs
class SearchWindowAdapter (line 7) | public class SearchWindowAdapter : SearcherAdapter {
method SearchWindowAdapter (line 10) | public SearchWindowAdapter(string title) : base(title) {
class SearchNodeItem (line 14) | internal class SearchNodeItem : SearcherItem {
method SearchNodeItem (line 16) | public SearchNodeItem(string name, SearchWindowProvider.NodeEntry node...
FILE: Editor/Graph/Views/SearchWindow/SearchWindowProvider.cs
class SearchWindowProvider (line 10) | public class SearchWindowProvider : ScriptableObject {
method Initialize (line 18) | public void Initialize(DlogEditorWindow editorWindow, EditorView edito...
method OnDestroy (line 28) | private void OnDestroy() {
method GenerateNodeEntries (line 35) | public void GenerateNodeEntries() {
method AddEntries (line 83) | private void AddEntries(SerializedNode node, string[] title, List<Node...
method AddEntries (line 109) | private void AddEntries(Type nodeType, string[] title, List<NodeEntry>...
method LoadSearchWindow (line 134) | public Searcher LoadSearchWindow() {
method OnSelectEntry (line 179) | public bool OnSelectEntry(SearcherItem selectedEntry, Vector2 mousePos...
type NodeEntry (line 217) | public struct NodeEntry : IEquatable<NodeEntry> {
method NodeEntry (line 224) | public NodeEntry(Type type, string[] title, int compatiblePortIndex,...
method NodeEntry (line 232) | public NodeEntry(SerializedNode node, string[] title, int compatible...
method Equals (line 240) | public bool Equals(NodeEntry other) {
method Equals (line 244) | public override bool Equals(object obj) {
method GetHashCode (line 248) | public override int GetHashCode() {
FILE: Editor/Importers/DlogGraphAssetPostProcessor.cs
class DlogGraphAssetPostprocessor (line 7) | public class DlogGraphAssetPostprocessor : AssetPostprocessor {
method OnPostprocessAllAssets (line 8) | private static void OnPostprocessAllAssets(string[] importedAssets, st...
method DisplayDeletionDialog (line 14) | private static void DisplayDeletionDialog(string[] deletedAssets) {
FILE: Editor/Importers/DlogGraphImporter.cs
class DlogGraphImporter (line 12) | [ScriptedImporter(0, Extension, 3)]
method OnImportAsset (line 16) | public override void OnImportAsset(AssetImportContext ctx) {
method ImportInvalidVersion (line 133) | private void ImportInvalidVersion(AssetImportContext ctx) {
FILE: Editor/Importers/DlogGraphImporterEditor.cs
class DlogGraphImporterEditor (line 9) | [CustomEditor(typeof(DlogGraphImporter))]
method OnInspectorGUI (line 16) | public override void OnInspectorGUI() {
method OpenEditorWindow (line 61) | public static bool OpenEditorWindow(string assetPath) {
method OpenEditorWindow (line 95) | private static void OpenEditorWindow(DlogGraphObject dlogObject, strin...
method OnOpenAsset (line 120) | [OnOpenAsset]
FILE: Editor/Inspector/DlogObjectEditor.cs
class DlogObjectEditor (line 10) | [CustomEditor(typeof(Runtime.RuntimeDialogueGraph))]
method OnEnable (line 32) | public void OnEnable() {
method CreateInspectorGUI (line 45) | public override VisualElement CreateInspectorGUI() {
method RefreshDlogObjectView (line 71) | private void RefreshDlogObjectView(VisualElement propertiesContainer, ...
method UpdateInspectorProperties (line 81) | private void UpdateInspectorProperties() {
method UpdatePersistentData (line 163) | private void UpdatePersistentData() {
FILE: Editor/Util/DialogueGraphUtility.cs
class DialogueGraphUtility (line 13) | public static class DialogueGraphUtility {
method CreateFile (line 17) | public static bool CreateFile(string path, DlogGraphObject dlogObject,...
method CreateFileNoUpdate (line 27) | public static void CreateFileNoUpdate(string path, DlogGraphObject dlo...
method SaveGraph (line 33) | public static bool SaveGraph(DlogGraphObject dlogObject, bool refreshA...
method LoadGraphAtPath (line 46) | public static DlogGraphObject LoadGraphAtPath(string assetPath) {
method LoadGraphAtGuid (line 62) | public static DlogGraphObject LoadGraphAtGuid(string assetGuid) {
method LoadJObjectAtPath (line 71) | public static JObject LoadJObjectAtPath(string assetPath) {
method FromJObject (line 83) | public static DlogGraphObject FromJObject(JObject converted) {
method VersionConvert (line 100) | public static JObject VersionConvert(SemVer fromVersion, JObject jsonO...
method VersionMismatch (line 107) | public static bool VersionMismatch(string assetPath) {
method SanitizeName (line 139) | public static string SanitizeName(IEnumerable<string> existingNames, s...
FILE: Editor/Util/Ref.cs
class Ref (line 4) | public class Ref<T> : IEquatable<T>, IEquatable<Ref<T>> where T : struct {
method Ref (line 9) | private Ref(T value) {
method Ref (line 13) | private Ref() {
method GetReference (line 17) | public ref T GetReference() {
method GetValue (line 25) | public T GetValue() {
method Set (line 33) | public void Set(T newValue) {
method SetValueUnbound (line 38) | public void SetValueUnbound(T newValue) {
method GetValueUnbound (line 42) | public T GetValueUnbound() {
method Bind (line 46) | public void Bind(Func<T> getValue, Action setValue) {
method Unbind (line 51) | public void Unbind() {
method Equals (line 57) | public bool Equals(T other) {
method Equals (line 61) | public bool Equals(Ref<T> other) {
method Equals (line 69) | public override bool Equals(object obj) {
method GetHashCode (line 79) | public override int GetHashCode() {
method ToString (line 105) | public override string ToString() {
method MakeRef (line 109) | public static Ref<T> MakeRef(T initialValue, Func<T> getValue, Action ...
method MakeRef (line 115) | public static Ref<T> MakeRef(T initialValue) {
method MakeRef (line 119) | public static Ref<T> MakeRef() {
FILE: Editor/Util/ResourcesUtility.cs
class ResourcesUtility (line 2) | public static class ResourcesUtility {
FILE: Editor/Util/UIElementsFactory.cs
class UIElementsFactory (line 5) | public static class UIElementsFactory {
method FlexBreaker (line 6) | public static VisualElement FlexBreaker() {
method Button (line 10) | public static Button Button(string buttonText, string name, string but...
method VisualElement (line 17) | public static T VisualElement<T>(string name, string[] classNames) whe...
method TextElement (line 24) | public static T TextElement<T>(string name, string text, string[] clas...
method TextField (line 32) | public static TextField TextField(string name, string label, string[] ...
FILE: Editor/Util/Versioning/Conversion/ConvertMethodAttribute.cs
class ConvertMethodAttribute (line 5) | [AttributeUsage(AttributeTargets.Method, Inherited = false), MeansImplic...
method ConvertMethodAttribute (line 13) | public ConvertMethodAttribute(string targetVersion) {
FILE: Editor/Util/Versioning/Conversion/VersionConverter.cs
class VersionConverter (line 12) | public static class VersionConverter {
method GetNextVersion (line 22) | private static SemVer GetNextVersion(SemVer from) {
method ConvertVersion (line 32) | public static JObject ConvertVersion(SemVer from, SemVer to, JObject j...
method U_112 (line 46) | [ConvertMethod("1.1.2")]
method U_200 (line 53) | [ConvertMethod("2.0.0")]
method UpgradeTo (line 80) | private static JObject UpgradeTo(SemVer version, JObject dlogGraphObje...
method BuildMethodCache (line 92) | private static void BuildMethodCache() {
FILE: Editor/Util/Versioning/SemVer.cs
type SemVer (line 5) | [Serializable]
method SemVer (line 18) | public SemVer(string versionString) {
method SemVer (line 30) | public SemVer(int major, int minor, int patch) {
method ToString (line 36) | public override string ToString() {
method FromVersionString (line 48) | public static SemVer FromVersionString(string versionString) {
method IsValid (line 52) | public static bool IsValid(string versionString, out int major, out in...
method IsValid (line 70) | public static bool IsValid(string versionString) => IsValid(versionStr...
method Equals (line 72) | public bool Equals(SemVer other) {
method Equals (line 76) | public override bool Equals(object obj) {
method GetHashCode (line 80) | public override int GetHashCode() {
method CompareTo (line 97) | public int CompareTo(SemVer other) {
FILE: Runtime/Data/ActorData.cs
class ActorData (line 5) | [Serializable]
method ActorData (line 11) | public ActorData(string name, ScriptableObject customData, Property pr...
FILE: Runtime/Data/BooleanOperation.cs
type BooleanOperation (line 2) | public enum BooleanOperation {
FILE: Runtime/Data/CheckTree.cs
class CheckTree (line 5) | [Serializable]
type Kind (line 7) | public enum Kind {
method Property (line 28) | public static CheckTree Property(string propertyGuid) {
method Unary (line 35) | public static CheckTree Unary(BooleanOperation operation, CheckTree su...
method Binary (line 43) | public static CheckTree Binary(BooleanOperation operation, CheckTree s...
method OnBeforeSerialize (line 52) | public void OnBeforeSerialize() {
method OnAfterDeserialize (line 69) | public void OnAfterDeserialize() {
FILE: Runtime/Data/ConversationLine.cs
class ConversationLine (line 5) | [Serializable]
FILE: Runtime/Data/DlogObject.cs
class DlogObject (line 7) | public class DlogObject : ScriptableObject {
method BuildGraph (line 17) | public void BuildGraph() {
method ParseCheckTree (line 97) | private CheckTree ParseCheckTree(Edge edge, Dictionary<string, Node> p...
FILE: Runtime/Data/Edge.cs
class Edge (line 4) | [Serializable]
FILE: Runtime/Data/Node.cs
class Node (line 5) | [Serializable]
type NodeType (line 23) | public enum NodeType {
FILE: Runtime/Data/Properties/Property.cs
class Property (line 4) | [Serializable]
FILE: Runtime/Data/Properties/PropertyType.cs
type PropertyType (line 2) | public enum PropertyType {
FILE: Runtime/DlogObjectData.cs
class DlogObjectData (line 5) | [Serializable]
method DlogObjectData (line 14) | public DlogObjectData() {
method AddActorData (line 23) | public void AddActorData(string guid, ActorData data) {
method AddCheckEvent (line 28) | public void AddCheckEvent(string guid, CheckEvent evt) {
method AddTriggerEvent (line 34) | public void AddTriggerEvent(string guid, TriggerEvent evt) {
FILE: Runtime/GenericDataTypes.cs
class CheckEvent (line 5) | [Serializable] public class CheckEvent : SerializableCallback<string, in...
class TriggerEvent (line 7) | [Serializable] public class TriggerEvent : SerializableEvent<string, int...
class StringIntSerializableDictionary (line 9) | [Serializable] public class StringIntSerializableDictionary : Serializab...
class NodeDictionary (line 10) | [Serializable] public class NodeDictionary : SerializableDictionary<stri...
class PropertyDictionary (line 11) | [Serializable] public class PropertyDictionary : SerializableDictionary<...
FILE: Runtime/RuntimeDialogueGraph.cs
class RuntimeDialogueGraph (line 6) | [AddComponentMenu("Dialogue Graph/Dialogue Graph")]
method ClearData (line 36) | public void ClearData() {
method ResetConversation (line 45) | public void ResetConversation() {
method EndConversation (line 50) | public void EndConversation() {
method IsCurrentNpc (line 55) | public bool IsCurrentNpc() {
method IsConversationDone (line 60) | public bool IsConversationDone() {
method GetCurrentActor (line 64) | public ActorData GetCurrentActor() {
method GetCurrentLines (line 72) | public List<ConversationLine> GetCurrentLines() {
method ProgressNpc (line 77) | public string ProgressNpc() {
method ProgressSelf (line 97) | public string ProgressSelf(int lineIndex) {
method ExecuteChecks (line 104) | private bool ExecuteChecks(ConversationLine line, int lineIndex) {
method ExecuteTriggers (line 113) | private void ExecuteTriggers(ConversationLine line, int lineIndex) {
method Progress (line 119) | private void Progress(ConversationLine line) {
method EvaluateCheckTree (line 129) | private bool EvaluateCheckTree(CheckTree tree, int lineIndex) {
method EvaluateUnaryOperation (line 153) | private static bool EvaluateUnaryOperation(BooleanOperation operation,...
method EvaluateBinaryOperation (line 160) | private static bool EvaluateBinaryOperation(BooleanOperation operation...
FILE: Samples~/DemoProject/Scripts/LineController.cs
class LineController (line 7) | public class LineController : MonoBehaviour {
method Clear (line 14) | public void Clear() {
method Initialize (line 19) | public void Initialize(List<ConversationLine> lines) {
method SelectLine (line 33) | public void SelectLine(int index) {
method Update (line 40) | private void Update() {
FILE: Samples~/DemoProject/Scripts/LineEntry.cs
class LineEntry (line 7) | public class LineEntry : MonoBehaviour {
method Initialize (line 11) | public void Initialize(string text) {
method Select (line 16) | public void Select(bool selected) {
FILE: Samples~/DemoProject/Scripts/NPCDialogue.cs
class NPCDialogue (line 5) | public class NPCDialogue : MonoBehaviour {
method Update (line 28) | private void Update() {
method PlayerSelect (line 95) | public void PlayerSelect(int index) {
method MetBefore (line 103) | public bool MetBefore(string node, int lineIndex) {
method Angry (line 107) | public bool Angry(string node, int lineIndex) {
method Meet (line 111) | public void Meet(string node, int lineIndex) {
method MakeAngry (line 115) | public void MakeAngry(string node, int lineIndex) {
method ClearAngry (line 119) | public void ClearAngry(string node, int lineIndex) {
method PlayGame (line 123) | public void PlayGame(string node, int lineIndex) {
method OpenShop (line 134) | public void OpenShop(string node, int lineIndex) {
Condensed preview — 279 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (509K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 663,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": ".gitignore",
"chars": 3025,
"preview": "\n# Created by https://www.toptal.com/developers/gitignore/api/rider,unity\n# Edit at https://www.toptal.com/developers/gi"
},
{
"path": "Dependencies/SerializableCallback/.gitignore",
"chars": 0,
"preview": ""
},
{
"path": "Dependencies/SerializableCallback/Editor/SerializableCallbackDrawer.cs",
"chars": 14121,
"preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nus"
},
{
"path": "Dependencies/SerializableCallback/Editor/SerializableCallbackDrawer.cs.meta",
"chars": 284,
"preview": "fileFormatVersion: 2\nguid: 65cd8a53f6f9cf04ea4aa8e2743322fd\ntimeCreated: 1513845239\nlicenseType: Pro\nMonoImporter:\n ext"
},
{
"path": "Dependencies/SerializableCallback/Editor/Siccity.SerializableCallback.Editor.asmdef",
"chars": 418,
"preview": "{\n \"name\": \"Siccity.SerializableCallback.Editor\",\n \"references\": [\n \"GUID:11a2306c728a4b843a652ec6c2f142bc\""
},
{
"path": "Dependencies/SerializableCallback/Editor/Siccity.SerializableCallback.Editor.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: a49fd1d25e23fd14e85d1cbf342bb06f\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "Dependencies/SerializableCallback/Editor.meta",
"chars": 213,
"preview": "fileFormatVersion: 2\nguid: 39c1d273b3e79e346a281e4a542a63a6\nfolderAsset: yes\ntimeCreated: 1513845239\nlicenseType: Pro\nDe"
},
{
"path": "Dependencies/SerializableCallback/LICENSE.md",
"chars": 1070,
"preview": "MIT License\n\nCopyright (c) 2017 Thor Brigsted\n\nPermission is hereby granted, free of charge, to any person obtaining a c"
},
{
"path": "Dependencies/SerializableCallback/LICENSE.md.meta",
"chars": 158,
"preview": "fileFormatVersion: 2\nguid: 664adef14643bfe44a13ce197b3a540c\nTextScriptImporter:\n externalObjects: {}\n userData: \n ass"
},
{
"path": "Dependencies/SerializableCallback/README.md",
"chars": 2075,
"preview": "### SerializableCallback\nLets you drag-and-drop methods with or without return values / parameters in the Unity inspecto"
},
{
"path": "Dependencies/SerializableCallback/README.md.meta",
"chars": 158,
"preview": "fileFormatVersion: 2\nguid: b5a8c7667bbebba4ca6545be57800251\nTextScriptImporter:\n externalObjects: {}\n userData: \n ass"
},
{
"path": "Dependencies/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs",
"chars": 489,
"preview": "using UnityEngine;\nusing System;\n\n/// <summary> Add to fields of your class extending SerializableCallbackBase<T,..> to"
},
{
"path": "Dependencies/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs.meta",
"chars": 262,
"preview": "fileFormatVersion: 2\nguid: 4b9b7d20cf54ac6489b84d21c29a4c69\ntimeCreated: 1536132736\nlicenseType: Pro\nMonoImporter:\n ser"
},
{
"path": "Dependencies/SerializableCallback/Runtime/Attributes.meta",
"chars": 191,
"preview": "fileFormatVersion: 2\nguid: 4fd350e49301e4445a1cbe580fe9eec7\nfolderAsset: yes\ntimeCreated: 1536132750\nlicenseType: Pro\nDe"
},
{
"path": "Dependencies/SerializableCallback/Runtime/InvokableCallback.cs",
"chars": 4481,
"preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\npublic class InvokableCal"
},
{
"path": "Dependencies/SerializableCallback/Runtime/InvokableCallback.cs.meta",
"chars": 285,
"preview": "fileFormatVersion: 2\nguid: ca67a6ce15814b743b8e123c175ce649\ntimeCreated: 1515587326\nlicenseType: Free\nMonoImporter:\n ex"
},
{
"path": "Dependencies/SerializableCallback/Runtime/InvokableCallbackBase.cs",
"chars": 112,
"preview": "public abstract class InvokableCallbackBase<TReturn> {\n\tpublic abstract TReturn Invoke(params object[] args);\n}"
},
{
"path": "Dependencies/SerializableCallback/Runtime/InvokableCallbackBase.cs.meta",
"chars": 285,
"preview": "fileFormatVersion: 2\nguid: 9147523dbcc2f2f46878180063444518\ntimeCreated: 1515583421\nlicenseType: Free\nMonoImporter:\n ex"
},
{
"path": "Dependencies/SerializableCallback/Runtime/InvokableEvent.cs",
"chars": 2913,
"preview": "using System;\n\npublic class InvokableEvent : InvokableEventBase {\n\n\tpublic System.Action action;\n\n\tpublic void Invoke()"
},
{
"path": "Dependencies/SerializableCallback/Runtime/InvokableEvent.cs.meta",
"chars": 285,
"preview": "fileFormatVersion: 2\nguid: 51f8a42e6f95b694cb28ca372e32aef3\ntimeCreated: 1515748293\nlicenseType: Free\nMonoImporter:\n ex"
},
{
"path": "Dependencies/SerializableCallback/Runtime/InvokableEventBase.cs",
"chars": 97,
"preview": "public abstract class InvokableEventBase {\n\tpublic abstract void Invoke(params object[] args);\n}"
},
{
"path": "Dependencies/SerializableCallback/Runtime/InvokableEventBase.cs.meta",
"chars": 285,
"preview": "fileFormatVersion: 2\nguid: e958262ec96656d459752d5df5faa52e\ntimeCreated: 1515748285\nlicenseType: Free\nMonoImporter:\n ex"
},
{
"path": "Dependencies/SerializableCallback/Runtime/SerializableCallback.cs",
"chars": 3497,
"preview": "using System;\nusing System.Linq.Expressions;\nusing System.Reflection;\nusing UnityEngine;\n\npublic abstract class Serializ"
},
{
"path": "Dependencies/SerializableCallback/Runtime/SerializableCallback.cs.meta",
"chars": 284,
"preview": "fileFormatVersion: 2\nguid: dc926a8278d45964e842b3ee4b9e593b\ntimeCreated: 1513845239\nlicenseType: Pro\nMonoImporter:\n ext"
},
{
"path": "Dependencies/SerializableCallback/Runtime/SerializableCallbackBase.cs",
"chars": 4829,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\nusing System.Linq.Expressions;\nusing System.Refl"
},
{
"path": "Dependencies/SerializableCallback/Runtime/SerializableCallbackBase.cs.meta",
"chars": 284,
"preview": "fileFormatVersion: 2\nguid: 7281861ef496a34429213165496d8cf3\ntimeCreated: 1513845239\nlicenseType: Pro\nMonoImporter:\n ext"
},
{
"path": "Dependencies/SerializableCallback/Runtime/SerializableEvent.cs",
"chars": 3126,
"preview": "[System.Serializable]\npublic class SerializableEvent : SerializableEventBase {\n\tpublic void Invoke() {\n\t\tif (invokable "
},
{
"path": "Dependencies/SerializableCallback/Runtime/SerializableEvent.cs.meta",
"chars": 285,
"preview": "fileFormatVersion: 2\nguid: 874a1a13ec4740a4387fe34d59931868\ntimeCreated: 1515747693\nlicenseType: Free\nMonoImporter:\n ex"
},
{
"path": "Dependencies/SerializableCallback/Runtime/SerializableEventBase.cs",
"chars": 1101,
"preview": "using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing System;\n\npublic abstract class Ser"
},
{
"path": "Dependencies/SerializableCallback/Runtime/SerializableEventBase.cs.meta",
"chars": 285,
"preview": "fileFormatVersion: 2\nguid: e5856b88cee94a64c95101c3f3de4754\ntimeCreated: 1515747887\nlicenseType: Free\nMonoImporter:\n ex"
},
{
"path": "Dependencies/SerializableCallback/Runtime/Siccity.SerializableCallback.asmdef",
"chars": 336,
"preview": "{\n \"name\": \"Siccity.SerializableCallback\",\n \"references\": [],\n \"includePlatforms\": [],\n \"excludePlatforms\": "
},
{
"path": "Dependencies/SerializableCallback/Runtime/Siccity.SerializableCallback.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: 11a2306c728a4b843a652ec6c2f142bc\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "Dependencies/SerializableCallback/Runtime/Test.cs",
"chars": 2213,
"preview": "using System;\nusing System.Diagnostics;\nusing UnityEngine;\n\npublic class Test : MonoBehaviour {\n\tconst int ITERATIONS ="
},
{
"path": "Dependencies/SerializableCallback/Runtime/Test.cs.meta",
"chars": 285,
"preview": "fileFormatVersion: 2\nguid: 933cfc79696bbd74ca51c70a8d61ae8d\ntimeCreated: 1514107717\nlicenseType: Free\nMonoImporter:\n ex"
},
{
"path": "Dependencies/SerializableCallback/Runtime.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: a6c274949c3a3494db6ab4e33e996353\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Dependencies/SerializableCallback/package.json",
"chars": 497,
"preview": "{\n \"name\": \"com.github.siccity.serializablecallback\",\n \"description\": \"UnityEvent and System.Func had a child. Lets yo"
},
{
"path": "Dependencies/SerializableCallback/package.json.meta",
"chars": 158,
"preview": "fileFormatVersion: 2\nguid: 70b54a564f424a742af19bd2af6873c5\nTextScriptImporter:\n externalObjects: {}\n userData: \n ass"
},
{
"path": "Dependencies/SerializableCallback.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: e9d9d85b74d78594b85a4a679b74607f\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Dependencies/SerializableDictionary/Editor/SerializableDictionary.Editor.asmdef",
"chars": 437,
"preview": "{\n \"name\": \"SerializableDictionary.Editor\",\n \"rootNamespace\": \"\",\n \"references\": [\n \"GUID:479678a6fc2d43"
},
{
"path": "Dependencies/SerializableDictionary/Editor/SerializableDictionary.Editor.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: 5debd524d9fe37b44aa7aede833a8eb7\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "Dependencies/SerializableDictionary/Editor/SerializableDictionaryPropertyDrawer.cs",
"chars": 18587,
"preview": "using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing UnityEditor;\nusing System.Reflecti"
},
{
"path": "Dependencies/SerializableDictionary/Editor/SerializableDictionaryPropertyDrawer.cs.meta",
"chars": 264,
"preview": "fileFormatVersion: 2\nguid: 91da51d02ab9ebc459d80d5965d40d19\ntimeCreated: 1492869349\nlicenseType: Store\nMonoImporter:\n s"
},
{
"path": "Dependencies/SerializableDictionary/Editor.meta",
"chars": 107,
"preview": "fileFormatVersion: 2\nguid: 20029ee1c099f4b47afbac48208879b9\nfolderAsset: yes\nDefaultImporter:\n userData: \n"
},
{
"path": "Dependencies/SerializableDictionary/LICENSE.md",
"chars": 1071,
"preview": "MIT License\n\nCopyright (c) 2017 Mathieu Le Ber\n\nPermission is hereby granted, free of charge, to any person obtaining a "
},
{
"path": "Dependencies/SerializableDictionary/LICENSE.md.meta",
"chars": 158,
"preview": "fileFormatVersion: 2\nguid: 2a97e78bf2f61e647b9ea0a65d08182f\nTextScriptImporter:\n externalObjects: {}\n userData: \n ass"
},
{
"path": "Dependencies/SerializableDictionary/Runtime/SerializableDictionary.Runtime.asmdef",
"chars": 47,
"preview": "{\n\t\"name\": \"SerializableDictionary.Runtime\"\n}\n"
},
{
"path": "Dependencies/SerializableDictionary/Runtime/SerializableDictionary.Runtime.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: 479678a6fc2d434439a70c037334ff05\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "Dependencies/SerializableDictionary/Runtime/SerializableDictionary.cs",
"chars": 2793,
"preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Runtime.Serialization;\nusing Uni"
},
{
"path": "Dependencies/SerializableDictionary/Runtime/SerializableDictionary.cs.meta",
"chars": 264,
"preview": "fileFormatVersion: 2\nguid: e7be1c9624387604fba4005ccf7dbd5a\ntimeCreated: 1492868176\nlicenseType: Store\nMonoImporter:\n s"
},
{
"path": "Dependencies/SerializableDictionary/Runtime.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 530de5b115dd7534da8f7a363e46ff21\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Dependencies/SerializableDictionary.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: fe19274f8c2b0a84792bd6eb2e84f3bd\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Dependencies.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 7347c27e9815d5940be3e3aaab93719d\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Editor/AssetCallbacks/CreateDlogGraph.cs",
"chars": 1184,
"preview": "using UnityEditor;\nusing UnityEditor.ProjectWindowCallback;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n internal c"
},
{
"path": "Editor/AssetCallbacks/CreateDlogGraph.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 59cfb2bf5b2642d7b229cd3deef9cb50\ntimeCreated: 1601287977"
},
{
"path": "Editor/AssetCallbacks.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 2fa84c3ec7fe454fa441b8dcd5ac2265\ntimeCreated: 1601287955"
},
{
"path": "Editor/DialogueGraph.Editor.asmdef",
"chars": 609,
"preview": "{\n \"name\": \"DialogueGraph.Editor\",\n \"rootNamespace\": \"\",\n \"references\": [\n \"GUID:d6f4b79f0a67eb24690aba8"
},
{
"path": "Editor/DialogueGraph.Editor.asmdef.meta",
"chars": 166,
"preview": "fileFormatVersion: 2\nguid: 88c608744485bf646beed5cc3dd91a6c\nAssemblyDefinitionImporter:\n externalObjects: {}\n userData"
},
{
"path": "Editor/Extensions/DlogExtensions.cs",
"chars": 1495,
"preview": "using Newtonsoft.Json;\nusing UnityEngine.UIElements;\n\nnamespace DialogueGraph {\n public static class DlogExtensions {"
},
{
"path": "Editor/Extensions/DlogExtensions.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 6c473de560d3477fa93a162cabb53e0e\ntimeCreated: 1603619074"
},
{
"path": "Editor/Extensions/GUILayoutHelper.cs",
"chars": 636,
"preview": "using System;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n public static class GUILayoutHelper {\n public sta"
},
{
"path": "Editor/Extensions/GUILayoutHelper.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: b82632cfd46f4b8ca42700903771073e\ntimeCreated: 1606319893"
},
{
"path": "Editor/Extensions/GraphViewExtensions.cs",
"chars": 2395,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing UnityEdito"
},
{
"path": "Editor/Extensions/GraphViewExtensions.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 9170694da96b489daea9c57d451d8470\ntimeCreated: 1602766163"
},
{
"path": "Editor/Extensions/VisualElementExtensions.cs",
"chars": 450,
"preview": "using UnityEngine;\nusing UnityEngine.UIElements;\n\nnamespace DialogueGraph {\n public static class VisualElementExtensi"
},
{
"path": "Editor/Extensions/VisualElementExtensions.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 229e7e4f55474e20ad013144d24a39ae\ntimeCreated: 1601282440"
},
{
"path": "Editor/Extensions.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 2a94fe7d0d1e46e7ac194f7ab65aafb1\ntimeCreated: 1601282428"
},
{
"path": "Editor/Graph/Attributes/TitleAttribute.cs",
"chars": 293,
"preview": "using System;\n\nnamespace DialogueGraph {\n [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]\n public c"
},
{
"path": "Editor/Graph/Attributes/TitleAttribute.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: c6b5cce28add4b3cb603e233a3926bd1\ntimeCreated: 1601474130"
},
{
"path": "Editor/Graph/Attributes.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 2710773280374843a854a2c722541286\ntimeCreated: 1601474123"
},
{
"path": "Editor/Graph/Data/CopyPasteData.cs",
"chars": 5266,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n [Se"
},
{
"path": "Editor/Graph/Data/CopyPasteData.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 59de5bfe57a04708b153166215579951\ntimeCreated: 1602764627"
},
{
"path": "Editor/Graph/Data/DlogGraphData.cs",
"chars": 14605,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nus"
},
{
"path": "Editor/Graph/Data/DlogGraphData.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: c191dd86e9a94d78baaeb54ed76b3022\ntimeCreated: 1601289631"
},
{
"path": "Editor/Graph/Data/DlogGraphObject.cs",
"chars": 2520,
"preview": "using System;\nusing UnityEditor;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n public class DlogGraphObject : Script"
},
{
"path": "Editor/Graph/Data/DlogGraphObject.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 45a52db35d93407fb259c4996ec53fa6\ntimeCreated: 1601289640"
},
{
"path": "Editor/Graph/Data/NodeDrawState.cs",
"chars": 214,
"preview": "using System;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n [Serializable]\n public struct NodeDrawState {\n "
},
{
"path": "Editor/Graph/Data/NodeDrawState.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 76290e77b5a74b6ba5d52be0d2aaa0ef\ntimeCreated: 1601551907"
},
{
"path": "Editor/Graph/Data/Properties/AbstractProperty.cs",
"chars": 2209,
"preview": "using System;\nusing DialogueGraph.Runtime;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n [Serializable]\n public a"
},
{
"path": "Editor/Graph/Data/Properties/AbstractProperty.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 8b7821e2c03c442f8979d30247900abe\ntimeCreated: 1602590130"
},
{
"path": "Editor/Graph/Data/Properties/ActorProperty.cs",
"chars": 475,
"preview": "using System;\nusing DialogueGraph.Runtime;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n [Serializable]\n public c"
},
{
"path": "Editor/Graph/Data/Properties/ActorProperty.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: b1714ccfa2d94454bad768ada07829b1\ntimeCreated: 1602591421"
},
{
"path": "Editor/Graph/Data/Properties/CheckProperty.cs",
"chars": 455,
"preview": "using System;\nusing DialogueGraph.Runtime;\n\nnamespace DialogueGraph {\n [Serializable]\n public class CheckProperty "
},
{
"path": "Editor/Graph/Data/Properties/CheckProperty.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 791df7817718417b8d85ff456275f787\ntimeCreated: 1602591348"
},
{
"path": "Editor/Graph/Data/Properties/TriggerProperty.cs",
"chars": 465,
"preview": "using System;\nusing DialogueGraph.Runtime;\n\nnamespace DialogueGraph {\n [Serializable]\n public class TriggerPropert"
},
{
"path": "Editor/Graph/Data/Properties/TriggerProperty.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: b4055b2efff2408cbc7af168eedbc563\ntimeCreated: 1602590953"
},
{
"path": "Editor/Graph/Data/Properties.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: f28d6edcc2e74cfc9d314ba343872167\ntimeCreated: 1602590819"
},
{
"path": "Editor/Graph/Data/SerializedEdge.cs",
"chars": 1150,
"preview": "using System;\nusing UnityEditor.Experimental.GraphView;\nusing UnityEngine;\nusing Edge = UnityEditor.Experimental.GraphVi"
},
{
"path": "Editor/Graph/Data/SerializedEdge.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 647548daa8934a929f8e14371c0705df\ntimeCreated: 1601479470"
},
{
"path": "Editor/Graph/Data/SerializedNode.cs",
"chars": 3166,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing UnityEditor.Experimental.GraphView;\nusing UnityEn"
},
{
"path": "Editor/Graph/Data/SerializedNode.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 7a13f7ce51ca435792839c6342944c7d\ntimeCreated: 1601479420"
},
{
"path": "Editor/Graph/Data/SerializedProperty.cs",
"chars": 451,
"preview": "using System;\nusing Newtonsoft.Json;\n\nnamespace DialogueGraph {\n [Serializable]\n public class SerializedProperty {"
},
{
"path": "Editor/Graph/Data/SerializedProperty.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 851b6a27fb244793a696f96b78ccf017\ntimeCreated: 1602600670"
},
{
"path": "Editor/Graph/Data/VersionMismatchObject.cs",
"chars": 115,
"preview": "using UnityEngine;\n\nnamespace DialogueGraph {\n internal class VersionMismatchObject : ScriptableObject {\n }\n}"
},
{
"path": "Editor/Graph/Data/VersionMismatchObject.cs.meta",
"chars": 83,
"preview": "fileFormatVersion: 2\nguid: 15c4241bdbc14e7e9ac2eabe65b9b4b7\ntimeCreated: 1649591459"
},
{
"path": "Editor/Graph/Data.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: dd017a28da8740f881573ba039014b54\ntimeCreated: 1601480300"
},
{
"path": "Editor/Graph/Nodes/AbstractNode.cs",
"chars": 3194,
"preview": "using System;\nusing System.Collections.Generic;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing UnityEditor.Exp"
},
{
"path": "Editor/Graph/Nodes/AbstractNode.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: eb86560c1bb04cc997a78be15a95ac6e\ntimeCreated: 1601474268"
},
{
"path": "Editor/Graph/Nodes/Boolean/BinaryBooleanNode.cs",
"chars": 2027,
"preview": "using UnityEditor.Experimental.GraphView;\nusing UnityEngine.UIElements;\n\nnamespace DialogueGraph {\n public abstract c"
},
{
"path": "Editor/Graph/Nodes/Boolean/BinaryBooleanNode.cs.meta",
"chars": 83,
"preview": "fileFormatVersion: 2\nguid: 2d98f66e26a848fc9816693d42cacd53\ntimeCreated: 1649584538"
},
{
"path": "Editor/Graph/Nodes/Boolean/BooleanNodes.cs",
"chars": 1576,
"preview": "namespace DialogueGraph {\n [Title(\"Boolean\", \"NOT\")]\n public class NotBooleanNode : UnaryBooleanNode {\n pro"
},
{
"path": "Editor/Graph/Nodes/Boolean/BooleanNodes.cs.meta",
"chars": 83,
"preview": "fileFormatVersion: 2\nguid: 7dc49fe917b6428e91e2a2d58287cd04\ntimeCreated: 1649584579"
},
{
"path": "Editor/Graph/Nodes/Boolean/UnaryBooleanNode.cs",
"chars": 1790,
"preview": "using UnityEditor.Experimental.GraphView;\nusing UnityEngine.UIElements;\n\nnamespace DialogueGraph {\n public abstract c"
},
{
"path": "Editor/Graph/Nodes/Boolean/UnaryBooleanNode.cs.meta",
"chars": 83,
"preview": "fileFormatVersion: 2\nguid: 92835ae44e17474d9f9464a90008dfb0\ntimeCreated: 1649583997"
},
{
"path": "Editor/Graph/Nodes/Boolean.meta",
"chars": 83,
"preview": "fileFormatVersion: 2\nguid: 8f497a2553e74f8abd283933c4697b1f\ntimeCreated: 1649583978"
},
{
"path": "Editor/Graph/Nodes/NodeColors.cs",
"chars": 166,
"preview": "using UnityEngine;\n\nnamespace DialogueGraph {\n public static class NodeColors {\n public static Color CombinerC"
},
{
"path": "Editor/Graph/Nodes/NodeColors.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 5738c2748b044563868f33194c81519f\ntimeCreated: 1605351105"
},
{
"path": "Editor/Graph/Nodes/NpcNode.cs",
"chars": 8791,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nus"
},
{
"path": "Editor/Graph/Nodes/NpcNode.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: b568e3d4a5e943318ef80702f8618ac4\ntimeCreated: 1602757776"
},
{
"path": "Editor/Graph/Nodes/Port/DlogPort.cs",
"chars": 1728,
"preview": "using System;\nusing UnityEditor.Experimental.GraphView;\nusing UnityEngine;\nusing UnityEngine.UIElements;\n\nnamespace Dial"
},
{
"path": "Editor/Graph/Nodes/Port/DlogPort.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 0e8d2ea4b7c44d64abb892732dda440d\ntimeCreated: 1601566487"
},
{
"path": "Editor/Graph/Nodes/Port/PortHelper.cs",
"chars": 2426,
"preview": "using System;\nusing UnityEditor.Experimental.GraphView;\nusing UnityEngine;\nusing UnityEngine.UIElements;\n\nnamespace Dial"
},
{
"path": "Editor/Graph/Nodes/Port/PortHelper.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 12906347bd6648799640a8de67e215e2\ntimeCreated: 1602761086"
},
{
"path": "Editor/Graph/Nodes/Port/PortType.cs",
"chars": 168,
"preview": "using System;\n\nnamespace DialogueGraph {\n public enum PortType {\n Check,\n Trigger,\n Actor,\n "
},
{
"path": "Editor/Graph/Nodes/Port/PortType.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 103e6d5a4c304e70b966ab3606a720da\ntimeCreated: 1602760423"
},
{
"path": "Editor/Graph/Nodes/Port.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: c72845a71ace4f8d9317f5fe221cccdf\ntimeCreated: 1602761062"
},
{
"path": "Editor/Graph/Nodes/PropertyNode.cs",
"chars": 3202,
"preview": "using System;\nusing System.Linq;\nusing DialogueGraph.Runtime;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing U"
},
{
"path": "Editor/Graph/Nodes/PropertyNode.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 1216d6e8ec004cadaf5f4ea56001aabb\ntimeCreated: 1602589699"
},
{
"path": "Editor/Graph/Nodes/SelfNode.cs",
"chars": 7270,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\nusing UnityEdito"
},
{
"path": "Editor/Graph/Nodes/SelfNode.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 86aadea30b7e406383c74d6a4f1323bb\ntimeCreated: 1602664809"
},
{
"path": "Editor/Graph/Nodes.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 6aacdf43d48142e2991d013ac6530c86\ntimeCreated: 1601474215"
},
{
"path": "Editor/Graph/Views/Blackboard/BlackboardPropertyView.cs",
"chars": 5279,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing DialogueGraph.Runtime;"
},
{
"path": "Editor/Graph/Views/Blackboard/BlackboardPropertyView.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 10eb046d63d54e71b2a354f974cbc412\ntimeCreated: 1602594572"
},
{
"path": "Editor/Graph/Views/Blackboard/BlackboardProvider.cs",
"chars": 7689,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing DialogueGraph.Runtime;\nusing UnityEditor;\nusing UnityEditor.E"
},
{
"path": "Editor/Graph/Views/Blackboard/BlackboardProvider.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 181433fccd214f9390d7f42778f4d9aa\ntimeCreated: 1601568462"
},
{
"path": "Editor/Graph/Views/Blackboard.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 2acfa4296e274da2b3b7d0cec23ea30f\ntimeCreated: 1602594556"
},
{
"path": "Editor/Graph/Views/DlogEditorWindow.cs",
"chars": 6397,
"preview": "using System;\nusing System.IO;\nusing System.Linq;\nusing UnityEditor;\nusing UnityEditor.UIElements;\nusing UnityEngine;\nu"
},
{
"path": "Editor/Graph/Views/DlogEditorWindow.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: e93a505429977a248b411e4eff69e2ee\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Editor/Graph/Views/DlogGraphView.cs",
"chars": 6238,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing UnityEditor;\nusing UnityEditor.Experimental.GraphView;\nusing"
},
{
"path": "Editor/Graph/Views/DlogGraphView.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 3a9050fcf358d544498b82a8536f4c82\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Editor/Graph/Views/DlogWindowEvents.cs",
"chars": 210,
"preview": "using System;\n\nnamespace DialogueGraph {\n public class DlogWindowEvents {\n public Action SaveRequested;\n "
},
{
"path": "Editor/Graph/Views/DlogWindowEvents.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 27bb48f0da2c4f3da96d42285852c486\ntimeCreated: 1601297810"
},
{
"path": "Editor/Graph/Views/EdgeConnectorListener.cs",
"chars": 1682,
"preview": "using System.Collections.Generic;\nusing UnityEditor.Experimental.GraphView;\nusing UnityEditor.Searcher;\nusing UnityEngin"
},
{
"path": "Editor/Graph/Views/EdgeConnectorListener.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 46ff9171b1404674a3d78ef287c8bd46\ntimeCreated: 1601564609"
},
{
"path": "Editor/Graph/Views/EditorView.cs",
"chars": 9484,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing UnityEditor;\nusing UnityEditor.Experimental.Gra"
},
{
"path": "Editor/Graph/Views/EditorView.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 572759720403428aa5086f2808ffea59\ntimeCreated: 1601626257"
},
{
"path": "Editor/Graph/Views/SearchWindow/SearchWindowAdapter.cs",
"chars": 649,
"preview": "using System.Collections.Generic;\nusing UnityEditor.Searcher;\nusing UnityEngine;\nusing UnityEngine.UIElements;\n\nnamespac"
},
{
"path": "Editor/Graph/Views/SearchWindow/SearchWindowAdapter.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 564509ea00d04e5d874a991b5ddf92f8\ntimeCreated: 1601478183"
},
{
"path": "Editor/Graph/Views/SearchWindow/SearchWindowProvider.cs",
"chars": 10808,
"preview": "using System;\nusing System.Collections.Generic;\nusing UnityEditor;\nusing UnityEditor.Experimental.GraphView;\nusing Unity"
},
{
"path": "Editor/Graph/Views/SearchWindow/SearchWindowProvider.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: d2d7d0597fd64ac089539a71b4d5702d\ntimeCreated: 1601476987"
},
{
"path": "Editor/Graph/Views/SearchWindow.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: ab683c8c51924f138863ce1098ecffbe\ntimeCreated: 1605080656"
},
{
"path": "Editor/Graph/Views.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 21cf724c72aa400a856f5d764b87963b\ntimeCreated: 1601551864"
},
{
"path": "Editor/Graph.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 55415ce1507e4265ab94f5c6cd942057\ntimeCreated: 1601473790"
},
{
"path": "Editor/Importers/DlogGraphAssetPostProcessor.cs",
"chars": 1035,
"preview": "using System;\nusing System.Linq;\nusing UnityEditor;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n public class DlogG"
},
{
"path": "Editor/Importers/DlogGraphAssetPostProcessor.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: f1ac861000a84b9fa1022dc691fb39ec\ntimeCreated: 1601487407"
},
{
"path": "Editor/Importers/DlogGraphImporter.cs",
"chars": 7300,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing DialogueGraph.Runtime;\nusing Newtonsoft.Json;\nu"
},
{
"path": "Editor/Importers/DlogGraphImporter.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: ce3d5155149c4d55879633c98686ac8a\ntimeCreated: 1601288320"
},
{
"path": "Editor/Importers/DlogGraphImporterEditor.cs",
"chars": 5802,
"preview": "using System.IO;\nusing Newtonsoft.Json.Linq;\nusing UnityEditor;\nusing UnityEditor.AssetImporters;\nusing UnityEditor.Call"
},
{
"path": "Editor/Importers/DlogGraphImporterEditor.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 376fda88de154fa19b3d11dd3c387968\ntimeCreated: 1601299327"
},
{
"path": "Editor/Importers.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 93ed6f674e384a14b43be58fe0708068\ntimeCreated: 1601288320"
},
{
"path": "Editor/Inspector/DlogObjectEditor.cs",
"chars": 11562,
"preview": "using System.Linq;\nusing DialogueGraph.Runtime;\nusing UnityEditor;\nusing UnityEditor.UIElements;\nusing UnityEngine;\nusin"
},
{
"path": "Editor/Inspector/DlogObjectEditor.cs.meta",
"chars": 243,
"preview": "fileFormatVersion: 2\nguid: 73d4a966490679d48b7ce9b539d5f151\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n "
},
{
"path": "Editor/Inspector.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: 7ef214c8cb3964a45bbe69a9772af6dc\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Editor/Util/DialogueGraphUtility.cs",
"chars": 7898,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing Syst"
},
{
"path": "Editor/Util/DialogueGraphUtility.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 7a7dc044dd524739a0b0e76bd7e5d9ec\ntimeCreated: 1601294987"
},
{
"path": "Editor/Util/Ref.cs",
"chars": 3521,
"preview": "using System;\n\nnamespace DialogueGraph {\n public class Ref<T> : IEquatable<T>, IEquatable<Ref<T>> where T : struct {\n"
},
{
"path": "Editor/Util/Ref.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: e648f829c217403ba95229c4826c5575\ntimeCreated: 1606316073"
},
{
"path": "Editor/Util/ResourcesUtility.cs",
"chars": 422,
"preview": "namespace DialogueGraph {\n public static class ResourcesUtility {\n public const string IconBig = \"Textures/dlo"
},
{
"path": "Editor/Util/ResourcesUtility.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 88da25b1efc040ec886d999fb3be8419\ntimeCreated: 1601305189"
},
{
"path": "Editor/Util/UIElementsFactory.cs",
"chars": 2261,
"preview": "using System;\nusing UnityEngine.UIElements;\n\nnamespace DialogueGraph {\n public static class UIElementsFactory {\n "
},
{
"path": "Editor/Util/UIElementsFactory.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 5af37a7a4127452692b84c896290393c\ntimeCreated: 1602751500"
},
{
"path": "Editor/Util/Versioning/Conversion/ConvertMethodAttribute.cs",
"chars": 638,
"preview": "using System;\nusing JetBrains.Annotations;\n\nnamespace DialogueGraph {\n [AttributeUsage(AttributeTargets.Method, Inher"
},
{
"path": "Editor/Util/Versioning/Conversion/ConvertMethodAttribute.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: f2622420eb2242bf9412f6b96cfeca0b\ntimeCreated: 1606485813"
},
{
"path": "Editor/Util/Versioning/Conversion/VersionConverter.cs",
"chars": 4430,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing System.Runtime.Compile"
},
{
"path": "Editor/Util/Versioning/Conversion/VersionConverter.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 1ef41f3bff6a4a5a83e68257e061444d\ntimeCreated: 1606481644"
},
{
"path": "Editor/Util/Versioning/Conversion.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: c13a35f5c76d4a138eba82586a4166e9\ntimeCreated: 1606485778"
},
{
"path": "Editor/Util/Versioning/SemVer.cs",
"chars": 3563,
"preview": "using System;\nusing UnityEngine;\n\nnamespace DialogueGraph {\n [Serializable]\n public struct SemVer : IEquatable<Sem"
},
{
"path": "Editor/Util/Versioning/SemVer.cs.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: d73d5b8f3978436b871a55d1bd70d10c\ntimeCreated: 1606315024"
},
{
"path": "Editor/Util/Versioning.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 82187cbe07de4496b8cd43b24a1df4cb\ntimeCreated: 1606317692"
},
{
"path": "Editor/Util.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 5a865807f1d847bfa857c83d03aa8ad7\ntimeCreated: 1601294980"
},
{
"path": "Editor.meta",
"chars": 172,
"preview": "fileFormatVersion: 2\nguid: aca13eb6206522d4093f809cf3789469\nfolderAsset: yes\nDefaultImporter:\n externalObjects: {}\n us"
},
{
"path": "Github~/CODE_OF_CONDUCT.md",
"chars": 3356,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "Github~/CONTRIBUTING.md",
"chars": 6506,
"preview": "# Contributing to DialogueGraph\n\nFirst and foremost, thank you! We appreciate that you want to contribute to DialogueGra"
},
{
"path": "LICENSE.md",
"chars": 1071,
"preview": "MIT License\n\nCopyright (c) 2020 Teodor Vecerdi\n\nPermission is hereby granted, free of charge, to any person obtaining a "
},
{
"path": "LICENSE.md.meta",
"chars": 155,
"preview": "fileFormatVersion: 2\nguid: 343a6fbf469a693458de3526bd08c60a\nDefaultImporter:\n externalObjects: {}\n userData: \n assetB"
},
{
"path": "README.md",
"chars": 6838,
"preview": "# Dialogue Graph\n<!--OpenUPM--><a href=\"https://openupm.com/packages/com.github.teodorvecerdi.dialoguegraph/\"><img alt s"
},
{
"path": "README.md.meta",
"chars": 158,
"preview": "fileFormatVersion: 2\nguid: 4f8ca7a64146b1442be43e037a67e778\nTextScriptImporter:\n externalObjects: {}\n userData: \n ass"
},
{
"path": "Resources/Inspector/ActorEditor.uxml",
"chars": 604,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<engine:UXML\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n "
},
{
"path": "Resources/Inspector/ActorEditor.uxml.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: e3dc224962364528a151499f82d24abf\ntimeCreated: 1603703586"
},
{
"path": "Resources/Inspector/CheckEditor.uxml",
"chars": 476,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<engine:UXML\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n "
},
{
"path": "Resources/Inspector/CheckEditor.uxml.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 4d96915c1ad84ce3bc8f9770f5153485\ntimeCreated: 1603705529"
},
{
"path": "Resources/Inspector/DlogObjectEditor.uxml",
"chars": 1283,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<UXML\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns"
},
{
"path": "Resources/Inspector/DlogObjectEditor.uxml.meta",
"chars": 282,
"preview": "fileFormatVersion: 2\nguid: cc78fdd42080cd14f85af71ac9003dd4\nScriptedImporter:\n internalIDToNameTable: []\n externalObje"
},
{
"path": "Resources/Inspector/Styles/ActorEditor.uss",
"chars": 334,
"preview": ".actor-container {\n background-color: #3b3b3b;\n margin: 5px;\n margin-left: -25px;\n padding: 5px;\n border-"
},
{
"path": "Resources/Inspector/Styles/ActorEditor.uss.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 2807a92595d34d228fe9aad795c613f3\ntimeCreated: 1603703586"
},
{
"path": "Resources/Inspector/Styles/CheckEditor.uss",
"chars": 313,
"preview": ".check-container {\n background-color: #3b3b3b;\n margin: 5px;\n margin-left: -25px;\n padding: 5px;\n border-"
},
{
"path": "Resources/Inspector/Styles/CheckEditor.uss.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 60b499fdae6e43ab9240cd7a914f9efb\ntimeCreated: 1603705529"
},
{
"path": "Resources/Inspector/Styles/DlogObjectEditor.uss",
"chars": 1055,
"preview": ".container {\n background-color: #222222;\n margin: 5px 10px 5px 0;\n padding: 5px;\n border-width: 3px;\n bor"
},
{
"path": "Resources/Inspector/Styles/DlogObjectEditor.uss.meta",
"chars": 305,
"preview": "fileFormatVersion: 2\nguid: 5c6c3742d93046943a6040e04d1b0424\nScriptedImporter:\n internalIDToNameTable: []\n externalObje"
},
{
"path": "Resources/Inspector/Styles/TriggerEditor.uss",
"chars": 317,
"preview": ".trigger-container {\n background-color: #3b3b3b;\n margin: 5px;\n margin-left: -25px;\n padding: 5px;\n borde"
},
{
"path": "Resources/Inspector/Styles/TriggerEditor.uss.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 0e06085925734968ae24bf42932ad179\ntimeCreated: 1603705571"
},
{
"path": "Resources/Inspector/Styles.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: fd3a39cf9a0c44188e1ce61d00508862\ntimeCreated: 1603705966"
},
{
"path": "Resources/Inspector/TriggerEditor.uxml",
"chars": 484,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<engine:UXML\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n "
},
{
"path": "Resources/Inspector/TriggerEditor.uxml.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: d8aeea66075a45f7a38c9852736c4f77\ntimeCreated: 1603705571"
},
{
"path": "Resources/Inspector.meta",
"chars": 84,
"preview": "fileFormatVersion: 2\nguid: 87b2bd76864b4a678398fb93aa264fc8\ntimeCreated: 1603703549"
},
{
"path": "Resources/Styles/Graph.uss",
"chars": 592,
"preview": "BlackboardRow.hovered #pill #selection-border {\n background-color: rgba(68, 192, 255, 0.4);\n border-color: #44C0F"
},
{
"path": "Resources/Styles/Graph.uss.meta",
"chars": 305,
"preview": "fileFormatVersion: 2\nguid: 060cede1a4d3f3c4aabfba9959daa453\nScriptedImporter:\n internalIDToNameTable: []\n externalObje"
},
{
"path": "Resources/Styles/Node/BooleanNode.uss",
"chars": 1596,
"preview": "#boolean-main {\n display: flex;\n flex-direction: row;\n align-content: center;\n -unity-background-image-tint-"
},
{
"path": "Resources/Styles/Node/BooleanNode.uss.meta",
"chars": 83,
"preview": "fileFormatVersion: 2\nguid: 7031cb1d9ff34f9484733e7b0bc5fef8\ntimeCreated: 1649584718"
},
{
"path": "Resources/Styles/Node/CombinerNode.uss",
"chars": 1273,
"preview": "#combiner-main {\n display: flex;\n flex-direction: row;\n align-content: center;\n -unity-background-image-tint"
}
]
// ... and 79 more files (download for full content)
About this extraction
This page contains the full source code of the TeodorVecerdi/DialogueGraph GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 279 files (457.3 KB), approximately 135.7k tokens, and a symbol index with 512 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.