├── .gitignore
├── Editor.meta
├── Editor
├── Attributes.meta
├── Attributes
│ ├── CustomGorkNodeEditorAttribute.cs
│ └── CustomGorkNodeEditorAttribute.cs.meta
├── Gork Graph.meta
├── Gork Graph
│ ├── Inspector Side Window.meta
│ ├── Inspector Side Window
│ │ ├── GorkInspectorView.cs
│ │ ├── GorkInspectorView.cs.meta
│ │ ├── GorkSplitView.cs
│ │ └── GorkSplitView.cs.meta
│ ├── Main Window.meta
│ ├── Main Window
│ │ ├── GorkGraphEditor.cs
│ │ ├── GorkGraphEditor.cs.meta
│ │ ├── GorkGraphEditor.uss
│ │ ├── GorkGraphEditor.uss.meta
│ │ ├── GorkGraphEditor.uxml
│ │ ├── GorkGraphEditor.uxml.meta
│ │ ├── GorkGraphView.cs
│ │ ├── GorkGraphView.cs.meta
│ │ ├── GorkMiniMap.cs
│ │ ├── GorkMiniMap.cs.meta
│ │ ├── QuestionMarkButton.uxml
│ │ ├── QuestionMarkButton.uxml.meta
│ │ ├── TagDisplay.uxml
│ │ ├── TagDisplay.uxml.meta
│ │ ├── TagLabel.uxml
│ │ ├── TagLabel.uxml.meta
│ │ ├── TagLabelArrows.uxml
│ │ └── TagLabelArrows.uxml.meta
│ ├── Nodes.meta
│ └── Nodes
│ │ ├── GorkEdge.cs
│ │ ├── GorkEdge.cs.meta
│ │ ├── GorkEdgeConnector.cs
│ │ ├── GorkEdgeConnector.cs.meta
│ │ ├── GorkGroup.cs
│ │ ├── GorkGroup.cs.meta
│ │ ├── GorkNodeView.cs
│ │ ├── GorkNodeView.cs.meta
│ │ ├── GorkPort.cs
│ │ └── GorkPort.cs.meta
├── Gork Wiki.meta
├── Gork Wiki
│ ├── GWPTextAssetInspector.cs
│ ├── GWPTextAssetInspector.cs.meta
│ ├── GorkWikiPage.cs
│ ├── GorkWikiPage.cs.meta
│ ├── GorkWikiWindow.cs
│ ├── GorkWikiWindow.cs.meta
│ ├── GorkWikiWindow.uxml
│ └── GorkWikiWindow.uxml.meta
├── Gork.Editor.asmdef
├── Gork.Editor.asmdef.meta
├── GorkAssetHandler.cs
├── GorkAssetHandler.cs.meta
├── GorkEditorSaveData.cs
├── GorkEditorSaveData.cs.meta
├── GorkEditorUtility.cs
├── GorkEditorUtility.cs.meta
├── GorkScriptingDefineSymbol.cs
├── GorkScriptingDefineSymbol.cs.meta
├── IDeletionCallback.cs
├── IDeletionCallback.cs.meta
├── Inspector.meta
├── Inspector
│ ├── GorkGraphPropertyDrawer.cs
│ ├── GorkGraphPropertyDrawer.cs.meta
│ ├── GorkGraphReaderEditor.cs
│ ├── GorkGraphReaderEditor.cs.meta
│ ├── GorkGraphScriptableObjectEditor.cs
│ └── GorkGraphScriptableObjectEditor.cs.meta
├── Node Editors.meta
├── Node Editors
│ ├── Builtin Nodes.meta
│ ├── Builtin Nodes
│ │ ├── Dialogue.meta
│ │ ├── Dialogue
│ │ │ ├── MultiLineDialogueNodeEditor.cs
│ │ │ ├── MultiLineDialogueNodeEditor.cs.meta
│ │ │ ├── SingleLineDialogueNodeEditor.cs
│ │ │ └── SingleLineDialogueNodeEditor.cs.meta
│ │ ├── Entries & Exits.meta
│ │ ├── Entries & Exits
│ │ │ ├── DisruptNodeEditor.cs
│ │ │ ├── DisruptNodeEditor.cs.meta
│ │ │ ├── WormholeEntryNodeEditor.cs
│ │ │ └── WormholeEntryNodeEditor.cs.meta
│ │ ├── Logic.meta
│ │ ├── Operations.meta
│ │ ├── Operations
│ │ │ ├── EqualsNodeEditor.cs
│ │ │ ├── EqualsNodeEditor.cs.meta
│ │ │ ├── StringFormatNodeEditor.cs
│ │ │ └── StringFormatNodeEditor.cs.meta
│ │ ├── Tools.meta
│ │ ├── Tools
│ │ │ ├── DebugLogNodeEditor.cs
│ │ │ ├── DebugLogNodeEditor.cs.meta
│ │ │ ├── Event.meta
│ │ │ ├── Event
│ │ │ │ ├── EventNodeEditor.cs
│ │ │ │ ├── EventNodeEditor.cs.meta
│ │ │ │ ├── ExternalEventNodeEditor.cs
│ │ │ │ ├── ExternalEventNodeEditor.cs.meta
│ │ │ │ ├── InternalEventNodeEditor.cs
│ │ │ │ └── InternalEventNodeEditor.cs.meta
│ │ │ ├── WaitForSecondsNodeEditor.cs
│ │ │ └── WaitForSecondsNodeEditor.cs.meta
│ │ ├── Values.meta
│ │ └── Values
│ │ │ ├── BoolValueNodeEditor.cs
│ │ │ ├── BoolValueNodeEditor.cs.meta
│ │ │ ├── FloatValueNodeEditor.cs
│ │ │ ├── FloatValueNodeEditor.cs.meta
│ │ │ ├── IntValueNodeEditor.cs
│ │ │ ├── IntValueNodeEditor.cs.meta
│ │ │ ├── Parameter.meta
│ │ │ ├── Parameter
│ │ │ ├── ParameterNodeEditor.cs
│ │ │ └── ParameterNodeEditor.cs.meta
│ │ │ ├── StringValueNodeEditor.cs
│ │ │ ├── StringValueNodeEditor.cs.meta
│ │ │ ├── ValueNodeEditor.cs
│ │ │ └── ValueNodeEditor.cs.meta
│ ├── GorkNodeEditor.cs
│ └── GorkNodeEditor.cs.meta
├── Resources.meta
├── Resources
│ ├── Gork Textures.meta
│ └── Gork Textures
│ │ ├── HD Logos.meta
│ │ ├── HD Logos
│ │ ├── gork_icon_HD.png
│ │ ├── gork_icon_HD.png.meta
│ │ ├── gork_logo_HD.png
│ │ ├── gork_logo_HD.png.meta
│ │ ├── gork_small_logo_HD.png
│ │ └── gork_small_logo_HD.png.meta
│ │ ├── gork_down_arrow.png
│ │ ├── gork_down_arrow.png.meta
│ │ ├── gork_minimap_hide.png
│ │ ├── gork_minimap_hide.png.meta
│ │ ├── gork_minimap_show.png
│ │ ├── gork_minimap_show.png.meta
│ │ ├── gork_question_mark.png
│ │ ├── gork_question_mark.png.meta
│ │ ├── gork_reset_icon.png
│ │ ├── gork_reset_icon.png.meta
│ │ ├── gork_window_icon.png
│ │ └── gork_window_icon.png.meta
├── Search Windows.meta
└── Search Windows
│ ├── GorkAssetSearchWindow.cs
│ ├── GorkAssetSearchWindow.cs.meta
│ ├── GorkNodeSearchWindow.cs
│ ├── GorkNodeSearchWindow.cs.meta
│ ├── GorkWikiPageSearchWindow.cs
│ └── GorkWikiPageSearchWindow.cs.meta
├── Gork.txt
├── Gork.txt.meta
├── README.md
├── README.md.meta
├── Runtime.meta
└── Runtime
├── Attributes.meta
├── Attributes
├── DontSaveInGorkGraphAttribute.cs
├── DontSaveInGorkGraphAttribute.cs.meta
├── GorkColorAttribute.cs
├── GorkColorAttribute.cs.meta
├── GorkConverterAttribute.cs
├── GorkConverterAttribute.cs.meta
├── GorkInputPortAttribute.cs
├── GorkInputPortAttribute.cs.meta
├── GorkMenuItemAttribute.cs
├── GorkMenuItemAttribute.cs.meta
├── GorkOutputPortAttribute.cs
├── GorkOutputPortAttribute.cs.meta
├── GorkPortAttribute.cs
├── GorkPortAttribute.cs.meta
├── GorkWikiInfoAttribute.cs
└── GorkWikiInfoAttribute.cs.meta
├── BaseGorkConvertions.cs
├── BaseGorkConvertions.cs.meta
├── Gork.asmdef
├── Gork.asmdef.meta
├── GorkGraphReader.cs
├── GorkGraphReader.cs.meta
├── GorkUtility.cs
├── GorkUtility.cs.meta
├── Nodes.meta
├── Nodes
├── Builtin Nodes.meta
├── Builtin Nodes
│ ├── Dialogue.meta
│ ├── Dialogue
│ │ ├── DialogueNode.cs
│ │ ├── DialogueNode.cs.meta
│ │ ├── GorkDialogueLine.cs
│ │ ├── GorkDialogueLine.cs.meta
│ │ ├── GorkDialogueProvider.cs
│ │ ├── GorkDialogueProvider.cs.meta
│ │ ├── MultiChoiceDialogueNode.cs
│ │ ├── MultiChoiceDialogueNode.cs.meta
│ │ ├── SingleLineDialogueNode.cs
│ │ └── SingleLineDialogueNode.cs.meta
│ ├── Entries & Exits.meta
│ ├── Entries & Exits
│ │ ├── DisruptNode.cs
│ │ ├── DisruptNode.cs.meta
│ │ ├── StartNode.cs
│ │ ├── StartNode.cs.meta
│ │ ├── StopNode.cs
│ │ ├── StopNode.cs.meta
│ │ ├── WormholeEntryNode.cs
│ │ ├── WormholeEntryNode.cs.meta
│ │ ├── WormholeExitNode.cs
│ │ └── WormholeExitNode.cs.meta
│ ├── Logic.meta
│ ├── Logic
│ │ ├── AndLogicGateNode.cs
│ │ ├── AndLogicGateNode.cs.meta
│ │ ├── IfNode.cs
│ │ ├── IfNode.cs.meta
│ │ ├── LogicGateNode.cs
│ │ ├── LogicGateNode.cs.meta
│ │ ├── OrLogicGateNode.cs
│ │ ├── OrLogicGateNode.cs.meta
│ │ ├── XorLogicGateNode.cs
│ │ └── XorLogicGateNode.cs.meta
│ ├── Operations.meta
│ ├── Operations
│ │ ├── BoolInvertNode.cs
│ │ ├── BoolInvertNode.cs.meta
│ │ ├── Comparison.meta
│ │ ├── Comparison
│ │ │ ├── EqualsNode.cs
│ │ │ ├── EqualsNode.cs.meta
│ │ │ ├── NotEqualsNode.cs
│ │ │ ├── NotEqualsNode.cs.meta
│ │ │ ├── Number Comparsion.meta
│ │ │ └── Number Comparsion
│ │ │ │ ├── GreaterEqualsComparisonNode.cs
│ │ │ │ ├── GreaterEqualsComparisonNode.cs.meta
│ │ │ │ ├── GreaterThanComparisonNode.cs
│ │ │ │ ├── GreaterThanComparisonNode.cs.meta
│ │ │ │ ├── NumberComparisonNode.cs
│ │ │ │ ├── NumberComparisonNode.cs.meta
│ │ │ │ ├── SmallerEqualsComparisonNode.cs
│ │ │ │ ├── SmallerEqualsComparisonNode.cs.meta
│ │ │ │ ├── SmallerThanComparisonNode.cs
│ │ │ │ └── SmallerThanComparisonNode.cs.meta
│ │ ├── Number Operation.meta
│ │ ├── Number Operation
│ │ │ ├── AddNumberNode.cs
│ │ │ ├── AddNumberNode.cs.meta
│ │ │ ├── DivideNumberNode.cs
│ │ │ ├── DivideNumberNode.cs.meta
│ │ │ ├── MultiplyNumberNode.cs
│ │ │ ├── MultiplyNumberNode.cs.meta
│ │ │ ├── NumberOperationNode.cs
│ │ │ ├── NumberOperationNode.cs.meta
│ │ │ ├── SubtractNumberNode.cs
│ │ │ └── SubtractNumberNode.cs.meta
│ │ ├── Rounding.meta
│ │ ├── Rounding
│ │ │ ├── CeilNumberNode.cs
│ │ │ ├── CeilNumberNode.cs.meta
│ │ │ ├── FloorNumberNode.cs
│ │ │ ├── FloorNumberNode.cs.meta
│ │ │ ├── RoundNumberNode.cs
│ │ │ └── RoundNumberNode.cs.meta
│ │ ├── StringFormatNode.cs
│ │ └── StringFormatNode.cs.meta
│ ├── Tools.meta
│ ├── Tools
│ │ ├── Coroutine.meta
│ │ ├── Coroutine
│ │ │ ├── CoroutineNode.cs
│ │ │ ├── CoroutineNode.cs.meta
│ │ │ ├── WaitForEndOfFrameNode.cs
│ │ │ ├── WaitForEndOfFrameNode.cs.meta
│ │ │ ├── WaitForFixedUpdateNode.cs
│ │ │ ├── WaitForFixedUpdateNode.cs.meta
│ │ │ ├── WaitForSecondsNode.cs
│ │ │ ├── WaitForSecondsNode.cs.meta
│ │ │ ├── WaitForSecondsRealtimeNode.cs
│ │ │ ├── WaitForSecondsRealtimeNode.cs.meta
│ │ │ ├── WaitUntilNode.cs
│ │ │ ├── WaitUntilNode.cs.meta
│ │ │ ├── WaitWhileNode.cs
│ │ │ └── WaitWhileNode.cs.meta
│ │ ├── DebugLogNode.cs
│ │ ├── DebugLogNode.cs.meta
│ │ ├── Event.meta
│ │ └── Event
│ │ │ ├── BoolExternalEventNode.cs
│ │ │ ├── BoolExternalEventNode.cs.meta
│ │ │ ├── EventNode.cs
│ │ │ ├── EventNode.cs.meta
│ │ │ ├── ExternalEventNode.cs
│ │ │ ├── ExternalEventNode.cs.meta
│ │ │ ├── FloatExternalEventNode.cs
│ │ │ ├── FloatExternalEventNode.cs.meta
│ │ │ ├── GenericExternalEventNode.cs
│ │ │ ├── GenericExternalEventNode.cs.meta
│ │ │ ├── IntExternalEventNode.cs
│ │ │ ├── IntExternalEventNode.cs.meta
│ │ │ ├── InternalEventNode.cs
│ │ │ ├── InternalEventNode.cs.meta
│ │ │ ├── StringExternalEventNode.cs
│ │ │ └── StringExternalEventNode.cs.meta
│ ├── Values.meta
│ └── Values
│ │ ├── BoolValueNode.cs
│ │ ├── BoolValueNode.cs.meta
│ │ ├── FloatValueNode.cs
│ │ ├── FloatValueNode.cs.meta
│ │ ├── IntValueNode.cs
│ │ ├── IntValueNode.cs.meta
│ │ ├── Parameter.meta
│ │ ├── Parameter
│ │ ├── BoolParameterNode.cs
│ │ ├── BoolParameterNode.cs.meta
│ │ ├── FloatParameterNode.cs
│ │ ├── FloatParameterNode.cs.meta
│ │ ├── IntParameterNode.cs
│ │ ├── IntParameterNode.cs.meta
│ │ ├── ParameterNode.cs
│ │ ├── ParameterNode.cs.meta
│ │ ├── StringParameterNode.cs
│ │ └── StringParameterNode.cs.meta
│ │ ├── StringValueNode.cs
│ │ ├── StringValueNode.cs.meta
│ │ ├── ValueNode.cs
│ │ └── ValueNode.cs.meta
├── GorkColors.cs
├── GorkColors.cs.meta
├── GorkNode.cs
├── GorkNode.cs.meta
├── NodePort.cs
├── NodePort.cs.meta
├── NodePortCollection.cs
└── NodePortCollection.cs.meta
├── Scriptable Objects.meta
└── Scriptable Objects
├── GorkGraph.cs
└── GorkGraph.cs.meta
/.gitignore:
--------------------------------------------------------------------------------
1 | # This .gitignore file should be placed at the root of your Unity project directory
2 | #
3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
4 | #
5 | /[Ll]ibrary/
6 | /[Tt]emp/
7 | /[Oo]bj/
8 | /[Bb]uild/
9 | /[Bb]uilds/
10 | /[Ll]ogs/
11 | /[Uu]ser[Ss]ettings/
12 |
13 | # MemoryCaptures can get excessive in size.
14 | # They also could contain extremely sensitive data
15 | /[Mm]emoryCaptures/
16 |
17 | # Recordings can get excessive in size
18 | /[Rr]ecordings/
19 |
20 | # Uncomment this line if you wish to ignore the asset store tools plugin
21 | # /[Aa]ssets/AssetStoreTools*
22 |
23 | # Autogenerated Jetbrains Rider plugin
24 | /[Aa]ssets/Plugins/Editor/JetBrains*
25 |
26 | # Visual Studio cache directory
27 | .vs/
28 |
29 | # Gradle cache directory
30 | .gradle/
31 |
32 | # Autogenerated VS/MD/Consulo solution and project files
33 | ExportedObj/
34 | .consulo/
35 | *.csproj
36 | *.unityproj
37 | *.sln
38 | *.suo
39 | *.tmp
40 | *.user
41 | *.userprefs
42 | *.pidb
43 | *.booproj
44 | *.svd
45 | *.pdb
46 | *.mdb
47 | *.opendb
48 | *.VC.db
49 |
50 | # Unity3D generated meta files
51 | *.pidb.meta
52 | *.pdb.meta
53 | *.mdb.meta
54 |
55 | # Unity3D generated file on crash reports
56 | sysinfo.txt
57 |
58 | # Builds
59 | *.apk
60 | *.aab
61 | *.unitypackage
62 | *.app
63 |
64 | # Crashlytics generated file
65 | crashlytics-build.properties
66 |
67 | # Packed Addressables
68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
69 |
70 | # Temporary auto-generated Android Assets
71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta
72 | /[Aa]ssets/[Ss]treamingAssets/aa/*
73 |
--------------------------------------------------------------------------------
/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c4c1d1d8099b555479dc38f65092e3b5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Attributes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eb2ffe9daa7460e498ed286af42ac269
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Attributes/CustomGorkNodeEditorAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | using UnityEditor;
6 |
7 | namespace Gork.Editor
8 | {
9 | ///
10 | ///
11 | ///
12 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
13 | public class CustomGorkNodeEditorAttribute : Attribute
14 | {
15 | ///
16 | /// Defines which object type the custom editor class can edit.
17 | ///
18 | public Type InspectedType => _inspectedType;
19 | private Type _inspectedType;
20 |
21 | ///
22 | /// If true, child classes of the will also show this editor.
23 | ///
24 | public bool Inherit;
25 |
26 | public CustomGorkNodeEditorAttribute(Type inspectedType)
27 | {
28 | _inspectedType = inspectedType;
29 | }
30 |
31 | ///
32 | /// A dictionary of every type and what editor it should have.
33 | ///
34 | public static Dictionary AssignedEditorTypes = new Dictionary();
35 |
36 | [InitializeOnLoadMethod]
37 | private static void CacheTypes()
38 | {
39 | List<(CustomGorkNodeEditorAttribute, Type)> inheritAttributes = new List<(CustomGorkNodeEditorAttribute, Type)>();
40 |
41 | // Loop through every single type with the CustomGorkNodeEditorAttribute attached
42 | foreach (Type type in TypeCache.GetTypesWithAttribute(typeof(CustomGorkNodeEditorAttribute)))
43 | {
44 | // Continue if the type we are checking is not a GorkNodeEditor type
45 | if (!type.IsSubclassOf(typeof(GorkNodeEditor)))
46 | {
47 | continue;
48 | }
49 |
50 | // Get every attribute attached to the type
51 | IEnumerable attributes = type.GetCustomAttributes();
52 |
53 | // Loop through all of the gotten attributes
54 | foreach (CustomGorkNodeEditorAttribute attribute in attributes)
55 | {
56 | // Check if the target type already exists in the dictionary
57 | if (AssignedEditorTypes.ContainsKey(attribute.InspectedType))
58 | {
59 | // Continue and display warning
60 | Debug.LogWarning($"The type \"{attribute.InspectedType.Name}\" has more than one GorkNodeEditor assigned!");
61 | continue;
62 | }
63 |
64 | if (attribute.Inherit)
65 | {
66 | inheritAttributes.Add((attribute, type));
67 | }
68 |
69 | // Add the types to the dictionary
70 | AssignedEditorTypes.Add(attribute.InspectedType, type);
71 | }
72 | }
73 |
74 | foreach ((CustomGorkNodeEditorAttribute, Type) pair in inheritAttributes)
75 | {
76 | foreach (Type derivedType in TypeCache.GetTypesDerivedFrom(pair.Item1.InspectedType))
77 | {
78 | if (AssignedEditorTypes.ContainsKey(derivedType))
79 | {
80 | continue;
81 | }
82 |
83 | AssignedEditorTypes.Add(derivedType, pair.Item2);
84 | }
85 | }
86 | }
87 |
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/Editor/Attributes/CustomGorkNodeEditorAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2bb6bb39f4557e343af67944cc34b7cd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 68fb2c7b5e1f38a4da8926a07331829a
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Inspector Side Window.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 466a47bf96a9f9340b98791e94156f46
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Inspector Side Window/GorkInspectorView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b280a93dfdc9c444b907974308e183d9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Inspector Side Window/GorkSplitView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 113035179d5653248b438dabc99c2577
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: edbb9de39bd42c745a6ac9978ed3414f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/GorkGraphEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 902f8184e0d2b0c47a46c670354df044
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/GorkGraphEditor.uss:
--------------------------------------------------------------------------------
1 | GridBackground {
2 | --grid-background-color: rgb(40, 40, 40);
3 | --line-color: rgba(255, 255, 255, 0.03);
4 | --thick-line-color: rgba(255, 255, 255, 0.03);
5 | --spacing: 15;
6 | }
7 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/GorkGraphEditor.uss.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c2e25dcacc8f5640aa2f9363cf2c317
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
11 | disableValidation: 0
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/GorkGraphEditor.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d7161daea0515e54a96156429ca01d97
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/GorkGraphView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3f70b2f053ac3e44cb6c1584be7b2597
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/GorkMiniMap.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a084a823ca10f2e4e8c539558604321a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/QuestionMarkButton.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/QuestionMarkButton.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8a946a2a81b7810498770d8973bff64e
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/TagDisplay.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/TagDisplay.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fe10a72ab6578cd4ca145d6915efb9e2
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/TagLabel.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/TagLabel.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e357c65f5f9f1a745ac97942c1664cc4
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/TagLabelArrows.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Main Window/TagLabelArrows.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73a1152054cdeac48ac61913fa6b4146
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Nodes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b23380d5121b6af479f6a59b90d6635d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Nodes/GorkEdge.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEditor.Experimental.GraphView;
3 | using System;
4 | using System.Reflection;
5 |
6 | namespace Gork.Editor
7 | {
8 | ///
9 | /// An that connects different together.
10 | ///
11 | public class GorkEdge : Edge
12 | {
13 | private static readonly MethodInfo _updateColorsMethod = typeof(Edge).GetMethod("UpdateEdgeControlColorsAndWidth", BindingFlags.Instance | BindingFlags.InvokeMethod | BindingFlags.NonPublic);
14 |
15 | public GorkGraphView GraphView;
16 |
17 | /*
18 | public GorkEdge()
19 | {
20 | this.AddManipulator(new ContextualMenuManipulator(BuildContextualMenu));
21 | }
22 |
23 | private void BuildContextualMenu(ContextualMenuPopulateEvent evt)
24 | {
25 | evt.menu.AppendAction("Delete", _ =>
26 | {
27 | });
28 | }
29 | */
30 |
31 | public static void UpdateColors(Edge edge)
32 | {
33 | _updateColorsMethod.Invoke(edge, null);
34 | }
35 |
36 | public void Delete()
37 | {
38 | GraphViewChange change = new GraphViewChange();
39 | change.elementsToRemove = new List();
40 |
41 | // Add this as an element to remove
42 | change.elementsToRemove.Add(this);
43 |
44 | // Invoke graphViewChanged to update the GraphView
45 | GraphView.graphViewChanged?.Invoke(change);
46 |
47 | // Disconnect
48 | input.Disconnect(this);
49 | output.Disconnect(this);
50 |
51 | // Remove this element from the graph
52 | GraphView.RemoveElement(this);
53 | }
54 |
55 | #region PasteData
56 | [Serializable]
57 | public class PasteData
58 | {
59 | public string Input;
60 | public int InputPortIndex;
61 |
62 | public string Output;
63 | public int OutputPortIndex;
64 | }
65 |
66 | public PasteData GetPasteData() => new PasteData()
67 | {
68 | // Spaghetti
69 | Input = (input.node as GorkNodeView).Node.GUID,
70 | InputPortIndex = (input as GorkPort).PortIndex,
71 |
72 | Output = (output.node as GorkNodeView).Node.GUID,
73 | OutputPortIndex = (output as GorkPort).PortIndex,
74 | };
75 | #endregion
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Nodes/GorkEdge.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f20861a120c9b414096108d4eb658e30
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Nodes/GorkEdgeConnector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | using UnityEngine.UIElements;
6 | using UnityEditor;
7 | using UnityEditor.Experimental.GraphView;
8 |
9 | namespace Gork.Editor
10 | {
11 | ///
12 | /// The class that connects together with different .
13 | ///
14 | public class GorkEdgeConnector : IEdgeConnectorListener
15 | {
16 | private GorkNodeView _nodeView;
17 | private GorkGraphView _graphView;
18 | private GorkPort _port;
19 |
20 | private GraphViewChange _graphViewChange;
21 | private List _edgesToCreate;
22 |
23 | public GorkEdgeConnector(GorkNodeView nodeView, GorkPort port)
24 | {
25 | _nodeView = nodeView;
26 | _graphView = _nodeView.GraphView;
27 | _port = port;
28 |
29 | _edgesToCreate = new List();
30 |
31 | _graphViewChange.edgesToCreate = _edgesToCreate;
32 | }
33 |
34 | public void OnDropOutsidePort(Edge edge, Vector2 position)
35 | {
36 | NodeCreationContext context = new NodeCreationContext() { screenMousePosition = GUIUtility.GUIToScreenPoint(Event.current.mousePosition) };
37 |
38 | _graphView.GorkSearchWindow.Position = _graphView.contentViewContainer.WorldToLocal(position);
39 | _graphView.OpenNodeCreationSearchWindow(context, _port);
40 | }
41 |
42 | public void OnDrop(GraphView graphView, Edge edge)
43 | {
44 | _edgesToCreate.Clear();
45 | _edgesToCreate.Add(edge);
46 |
47 | var edgesToCreate = _edgesToCreate;
48 | if (graphView.graphViewChanged != null)
49 | {
50 | edgesToCreate = graphView.graphViewChanged(_graphViewChange).edgesToCreate;
51 | }
52 |
53 | GorkEdge gorkEdge = edge as GorkEdge;
54 |
55 | if (gorkEdge != null)
56 | {
57 | gorkEdge.GraphView = graphView as GorkGraphView;
58 | }
59 |
60 | foreach (Edge e in edgesToCreate)
61 | {
62 | graphView.AddElement(e);
63 | edge.input.Connect(e);
64 | edge.output.Connect(e);
65 | }
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Nodes/GorkEdgeConnector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ca3cf3e3f0e2cee4a9815e8f605e39ac
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Nodes/GorkGroup.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ec707318f1975834f98da7be6fdc8202
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Nodes/GorkNodeView.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 63a2c2ae2af183e438298616391522c2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Graph/Nodes/GorkPort.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 40d311f13dab0ec49b59964b7668bd51
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Wiki.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59f2424f89856e64790ae87723223fb6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Gork Wiki/GWPTextAssetInspector.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using UnityEngine;
3 | using UnityEditor;
4 |
5 | namespace Gork.Editor
6 | {
7 | ///
8 | ///
9 | ///
10 | [CustomEditor(typeof(DefaultAsset))]
11 | public class GWPTextAssetInspector : UnityEditor.Editor
12 | {
13 | public override void OnInspectorGUI()
14 | {
15 | string path = AssetDatabase.GetAssetPath(target);
16 |
17 | if (string.IsNullOrEmpty(path)) { return; }
18 |
19 | if (path.ToLower().EndsWith(".gwp"))
20 | {
21 | GwpInspectorGUI(path);
22 | }
23 | else
24 | {
25 | base.OnInspectorGUI();
26 | }
27 | }
28 |
29 | private static void GwpInspectorGUI(string path)
30 | {
31 | GorkWikiPage page = GorkWikiPage.ReadGWPFile(path);
32 |
33 | bool startWordWrap = EditorStyles.label.wordWrap;
34 | bool startRichText = EditorStyles.label.richText;
35 |
36 | // Setup Text
37 | EditorStyles.label.wordWrap = true;
38 |
39 | // Title
40 | EditorStyles.label.alignment = TextAnchor.UpperCenter;
41 | EditorStyles.label.fontStyle = FontStyle.Bold;
42 | EditorStyles.label.fontSize += 8;
43 |
44 | Rect rect = EditorGUILayout.GetControlRect();
45 | rect.height += 8;
46 | EditorGUI.LabelField(rect, page.Title);
47 |
48 | EditorGUILayout.Space(8);
49 |
50 | // Reset font size
51 | EditorStyles.label.fontSize = 12;
52 |
53 | // Summary (if it exists)
54 | if (!string.IsNullOrEmpty(page.Summary))
55 | {
56 | EditorStyles.label.fontStyle = FontStyle.Italic;
57 | EditorGUILayout.LabelField(page.Summary);
58 | }
59 |
60 | EditorGUILayout.Space();
61 |
62 | // Main Text
63 | EditorStyles.label.richText = true;
64 | EditorStyles.label.alignment = TextAnchor.UpperLeft;
65 | EditorStyles.label.fontStyle = FontStyle.Normal;
66 |
67 | EditorGUILayout.LabelField(page.MainText);
68 |
69 | EditorStyles.label.wordWrap = startWordWrap;
70 | EditorStyles.label.richText = startRichText;
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Editor/Gork Wiki/GWPTextAssetInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e13ee2f75e8c9c6499b5feb070a7e385
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Wiki/GorkWikiPage.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 247d358438dd8b74ca5ecd4621f99250
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Wiki/GorkWikiWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0937214737806c242b16d87035ed4838
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Gork Wiki/GorkWikiWindow.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Editor/Gork Wiki/GorkWikiWindow.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 31c01322e7e6eb94dae441171641fd02
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Editor/Gork.Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Gork.Editor",
3 | "rootNamespace": "Gork.Editor",
4 | "references": [
5 | "GUID:dd0bfb71c18a4cc47aa4ff32fc71b632"
6 | ],
7 | "includePlatforms": [
8 | "Editor"
9 | ],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": true,
15 | "defineConstraints": [],
16 | "versionDefines": [],
17 | "noEngineReferences": false
18 | }
--------------------------------------------------------------------------------
/Editor/Gork.Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c1bce55cbb30b2341b97c6f7dd117b22
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Editor/GorkAssetHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Object = UnityEngine.Object;
3 | using UnityEditor;
4 | using UnityEditor.Callbacks;
5 |
6 |
7 | namespace Gork.Editor
8 | {
9 | ///
10 | /// Special editor script for Gork that handles the opening and deleting of a .
11 | ///
12 | public class GorkAssetHandler : AssetModificationProcessor
13 | {
14 | [OnOpenAsset]
15 | public static bool OnOpenAsset(int instanceID, int line)
16 | {
17 | // Load object using instance ID
18 | string path = AssetDatabase.GetAssetPath(instanceID);
19 |
20 | // Check if the path is a GWP file
21 | if (path.ToLower().EndsWith(".gwp"))
22 | {
23 | // If it is, then open the file up in the Gork Wiki
24 | GorkWikiWindow.OpenGWPFile(path);
25 | return true;
26 | }
27 |
28 | // If the file is not a GWP file, then we check if the file is a gork graph file
29 | Object obj = AssetDatabase.LoadMainAssetAtPath(path);
30 |
31 | // Get the object type
32 | Type objType = obj.GetType();
33 |
34 | // Check if the loaded object is of type gork graph
35 | if (objType != typeof(GorkGraph))
36 | {
37 | // Is not gork graph
38 | return false;
39 | }
40 | // It is gork graph!!
41 |
42 | // Open the gork graph in the Gork Graph Editor
43 | GorkGraphEditor.Open(obj as GorkGraph);
44 |
45 | return true;
46 | }
47 |
48 | public static AssetDeleteResult OnWillDeleteAsset(string path, RemoveAssetOptions opt)
49 | {
50 | GorkGraph graph = AssetDatabase.LoadMainAssetAtPath(path) as GorkGraph;
51 |
52 | if (graph != null && EditorWindow.HasOpenInstances())
53 | {
54 | EditorWindow.GetWindow().DeletedGraph(graph);
55 | }
56 |
57 | return AssetDeleteResult.DidNotDelete;
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Editor/GorkAssetHandler.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b406f8b5d45ec9c43b9e8f48ca5cd2cd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/GorkEditorSaveData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 73f49c085f1ab7d458c3b0508c1d46e9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/GorkEditorUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 524264b400fa14a4b8fad33867822ea8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/GorkScriptingDefineSymbol.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEditor.Build;
3 |
4 | namespace Gork.Editor
5 | {
6 | ///
7 | /// Always makes sure that the GORK define symbol is present in the scripting define symbols in the , ALWAYS.
8 | ///
9 | public class GorkScriptingDefineSymbol
10 | {
11 | [InitializeOnLoadMethod]
12 | public static void Init()
13 | {
14 | NamedBuildTarget currentBuildTarget = NamedBuildTarget.FromBuildTargetGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
15 |
16 | string currentDefineSymbols = PlayerSettings.GetScriptingDefineSymbols(currentBuildTarget);
17 |
18 | foreach (string defineSymbol in currentDefineSymbols.Split(';'))
19 | {
20 | // We already have the gork define symbol so no need to add it again
21 | if (defineSymbol == "GORK")
22 | {
23 | return;
24 | }
25 | }
26 |
27 | // Add the gork define symbol
28 | PlayerSettings.SetScriptingDefineSymbols(currentBuildTarget, currentDefineSymbols + ";GORK");
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Editor/GorkScriptingDefineSymbol.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2c29e6df8a99b8941bcf7f36abd128d0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/IDeletionCallback.cs:
--------------------------------------------------------------------------------
1 | namespace Gork.Editor
2 | {
3 | ///
4 | /// An interface that contains a callback which will be called if the attached is removed in the .
5 | ///
6 | public interface IDeletionCallback
7 | {
8 | void OnDeletion();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Editor/IDeletionCallback.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d27c9658092ca4a4e9d8e2d5940c5ab9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Inspector.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2fb073cfdb22ce44891ab313c1fa8ccb
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Inspector/GorkGraphPropertyDrawer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using UnityEditor;
5 | using UnityEditor.Experimental.GraphView;
6 |
7 | namespace Gork.Editor
8 | {
9 | ///
10 | ///
11 | ///
12 | [CustomPropertyDrawer(typeof(GorkGraph))]
13 | public class GorkGraphPropertyDrawer : PropertyDrawer
14 | {
15 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
16 | {
17 | //base.OnGUI(position, property, label);
18 |
19 | Rect objField = new Rect(position);
20 | objField.width -= 50;
21 |
22 | EditorGUI.ObjectField(objField, property, label);
23 |
24 | Rect buttonRect = new Rect(position);
25 |
26 | buttonRect.width = 50;
27 | buttonRect.x += objField.width;
28 |
29 | if (GUI.Button(buttonRect, "Find"))
30 | {
31 | GorkAssetSearchWindow window = GorkAssetSearchWindow.Instance;
32 | window.OnSelectGorkEntry = graph =>
33 | {
34 | if (graph == null)
35 | {
36 | return;
37 | }
38 |
39 | property.objectReferenceValue = graph;
40 | property.serializedObject.ApplyModifiedProperties();
41 | };
42 |
43 | SearchWindow.Open(new SearchWindowContext(GUIUtility.GUIToScreenPoint(Event.current.mousePosition)), window);
44 | }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Editor/Inspector/GorkGraphPropertyDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f89cc0bf06ec18d4e91c25050c9bd9e3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Inspector/GorkGraphReaderEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 235806388b3203e45ad0291467f36314
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Inspector/GorkGraphScriptableObjectEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using UnityEditor;
5 |
6 | namespace Gork.Editor
7 | {
8 | ///
9 | /// The for the .
10 | ///
11 | [CustomEditor(typeof(GorkGraph))]
12 | public class GorkGraphScriptableObjectEditor : UnityEditor.Editor
13 | {
14 | private GorkGraph _graph;
15 |
16 | private void OnEnable()
17 | {
18 | _graph = (GorkGraph)target;
19 | }
20 |
21 | public override void OnInspectorGUI()
22 | {
23 | using (new EditorGUI.DisabledScope(true))
24 | {
25 | EditorGUILayout.PropertyField(serializedObject.FindProperty("nodes"));
26 | }
27 |
28 | EditorGUILayout.Space();
29 |
30 | if (GUILayout.Button("Open in Gork Graph Editor"))
31 | {
32 | GorkGraphEditor.Open(_graph);
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Editor/Inspector/GorkGraphScriptableObjectEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6bb3c67824a53984aa1cfad5bf0cfe4d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 38d6de14df92f7a46a494ee6afd4e959
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 16a679a9cc4016e44b6ff835fbc2ec91
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Dialogue.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e7939fdc78507064bbbed0bf126a3d38
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Dialogue/MultiLineDialogueNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 | using UnityEditorInternal;
4 |
5 | namespace Gork.Editor
6 | {
7 | ///
8 | /// The node editor for the .
9 | ///
10 | [CustomGorkNodeEditor(typeof(MultiChoiceDialogueNode))]
11 | public class MultiLineDialogueNodeEditor : GorkNodeEditor
12 | {
13 | public const string PORT_FORMAT = "Choice {0}";
14 |
15 | private ReorderableList _list;
16 | private SerializedProperty _property;
17 |
18 | public override void OnViewEnable()
19 | {
20 | _property = FindProperty("Choices");
21 |
22 | _list = new ReorderableList(serializedObject,
23 | _property,
24 | true, true, true, true);
25 |
26 | _list.drawHeaderCallback = DrawHeaderCallback;
27 | _list.drawElementCallback = DrawElementCallback;
28 |
29 | _list.elementHeight = 60;
30 |
31 | UpdatePorts();
32 | }
33 |
34 | private void DrawHeaderCallback(Rect rect)
35 | {
36 | EditorGUI.LabelField(rect, "Choices");
37 | }
38 |
39 | private void DrawElementCallback(Rect rect, int index, bool isActive, bool isFocused)
40 | {
41 | SerializedProperty prop = _list.serializedProperty.GetArrayElementAtIndex(index);
42 |
43 | EditorGUI.PropertyField(rect, prop, new GUIContent($"Choice {index + 1}"));
44 | }
45 |
46 | protected override void OnInspectorGUI()
47 | {
48 | EditorGUILayout.Space();
49 |
50 | serializedObject.UpdateIfRequiredOrScript();
51 |
52 | int oldSize = _property.arraySize;
53 |
54 | _list.DoLayoutList();
55 |
56 | if (serializedObject.ApplyModifiedProperties())
57 | {
58 | if (oldSize != _property.arraySize)
59 | {
60 | UpdatePorts();
61 |
62 | UpdateNodeView();
63 | }
64 | }
65 | }
66 |
67 | private void UpdatePorts()
68 | {
69 | int propertyCount = _property.arraySize;
70 | int currentCount = CustomOutputPorts.Count;
71 | int max = Mathf.Max(currentCount, propertyCount);
72 |
73 | int? removalStartIndex = null;
74 | int removalCount = 0;
75 |
76 | for (int i = 0; i < max; i++)
77 | {
78 | string PortName() => string.Format(PORT_FORMAT, i + 1);
79 |
80 | // Add a new port
81 | if (i >= currentCount)
82 | {
83 | CustomOutputPorts.Add(new NodePort(PortName()));
84 | }
85 | // Remove the port
86 | else if (i >= propertyCount)
87 | {
88 | if (!removalStartIndex.HasValue)
89 | {
90 | removalStartIndex = i;
91 | }
92 |
93 | removalCount++;
94 | }
95 | // Update name of the port
96 | else
97 | {
98 | CustomOutputPorts[i].Name = PortName();
99 | }
100 | }
101 |
102 | // Remove all of the marked ports
103 | if (removalStartIndex.HasValue)
104 | {
105 | CustomOutputPorts.RemoveRange(removalStartIndex.Value, removalCount);
106 | }
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Dialogue/MultiLineDialogueNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e290db6ed1bbc61498ed4dc0f1327a12
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Dialogue/SingleLineDialogueNodeEditor.cs:
--------------------------------------------------------------------------------
1 | namespace Gork.Editor
2 | {
3 | ///
4 | /// The node editor for the .
5 | ///
6 | [CustomGorkNodeEditor(typeof(SingleLineDialogueNode))]
7 | public class SingleLineDialogueNodeEditor : GorkNodeEditor
8 | {
9 | public override float InspectorFieldWidth => 70;
10 |
11 | protected override void OnInspectorGUI()
12 | {
13 | SetupInspector();
14 |
15 | if (HasInputConnection(1))
16 | {
17 | return;
18 | }
19 |
20 | DoDefaultInspector();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Dialogue/SingleLineDialogueNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7a5ab154eee257646b1ca4947018fc8a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Entries & Exits.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: af1f44494f5333e4ebec893db83b58f7
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Entries & Exits/DisruptNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEditor.Experimental.GraphView;
3 |
4 | namespace Gork.Editor
5 | {
6 | ///
7 | /// The node editor for the .
8 | ///
9 | [CustomGorkNodeEditor(typeof(DisruptNode))]
10 | public class DisruptNodeEditor : GorkNodeEditor
11 | {
12 | private DisruptNode _node;
13 | private SerializedProperty _tagNameProp;
14 |
15 | public override void SetupEditor()
16 | {
17 | _node = Node as DisruptNode;
18 | _tagNameProp = FindProperty(nameof(_node.Tag));
19 | }
20 |
21 | public override void SetupDraw(Node node)
22 | {
23 | if (Expanded)
24 | {
25 | OnExpand();
26 | }
27 | }
28 |
29 | public override void OnRenameTag(string oldName, string newName)
30 | {
31 | if (_tagNameProp.stringValue == oldName)
32 | {
33 | _tagNameProp.stringValue = newName;
34 | serializedObject.ApplyModifiedProperties();
35 | }
36 | }
37 |
38 | public override void OnCollapse()
39 | {
40 | NodeView.outputContainer.Remove(IMGUIContainer);
41 | }
42 |
43 | public override void OnExpand()
44 | {
45 | NodeView.outputContainer.Add(IMGUIContainer);
46 | }
47 |
48 | protected override void OnInspectorGUI()
49 | {
50 | // Create a tag dropdown
51 | GorkEditorUtility.TagDropdown(_tagNameProp.stringValue, Graph.Tags, newTag =>
52 | {
53 | _tagNameProp.stringValue = newTag;
54 | serializedObject.ApplyModifiedProperties();
55 | }, false);
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Entries & Exits/DisruptNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e921e2e981c5c40468787417e9028910
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Entries & Exits/WormholeEntryNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 | using UnityEditor.Experimental.GraphView;
3 |
4 | namespace Gork.Editor
5 | {
6 | ///
7 | /// The node editor for the .
8 | ///
9 | [CustomGorkNodeEditor(typeof(WormholeEntryNode))]
10 | public class WormholeEntryNodeEditor : GorkNodeEditor
11 | {
12 | private WormholeEntryNode _node;
13 | private SerializedProperty _tagNameProp;
14 |
15 | public override void SetupEditor()
16 | {
17 | _node = Node as WormholeEntryNode;
18 | _tagNameProp = FindProperty(nameof(_node.Tag));
19 | }
20 |
21 | public override void SetupDraw(Node node)
22 | {
23 | if (Expanded)
24 | {
25 | OnExpand();
26 | }
27 | }
28 |
29 | public override void OnRenameTag(string oldName, string newName)
30 | {
31 | if (_tagNameProp.stringValue == oldName)
32 | {
33 | _tagNameProp.stringValue = newName;
34 | serializedObject.ApplyModifiedProperties();
35 | }
36 | }
37 |
38 | public override void OnCollapse()
39 | {
40 | NodeView.outputContainer.Remove(IMGUIContainer);
41 | }
42 |
43 | public override void OnExpand()
44 | {
45 | NodeView.outputContainer.Add(IMGUIContainer);
46 | }
47 |
48 | protected override void OnInspectorGUI()
49 | {
50 | // Create a tag dropdown
51 | GorkEditorUtility.TagDropdown(_tagNameProp.stringValue, Graph.Tags, newTag =>
52 | {
53 | _tagNameProp.stringValue = newTag;
54 | serializedObject.ApplyModifiedProperties();
55 | }, true, "");
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Entries & Exits/WormholeEntryNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3c4aa6485ad88004caab714a8fd27ba6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Logic.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d46dcf17b10f7fd4589fbc51f283a417
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Operations.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 303f7459fa0156243841db2b86417ad5
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Operations/EqualsNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2b72e8b4d916eb64d8bf2ae4de59e402
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Operations/StringFormatNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7395c9fc74e443b49b9c8e215176564e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d586c9504160fa449909d4b98222490b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/DebugLogNodeEditor.cs:
--------------------------------------------------------------------------------
1 | namespace Gork.Editor
2 | {
3 | ///
4 | /// The node editor for the .
5 | ///
6 | [CustomGorkNodeEditor(typeof(DebugLogNode))]
7 | public class DebugLogNodeEditor : GorkNodeEditor
8 | {
9 | public override float InspectorLabelWidth => 30;
10 | public override float InspectorFieldWidth => 50;
11 |
12 | protected override void OnInspectorGUI()
13 | {
14 | if (HasInputConnection(1))
15 | {
16 | return;
17 | }
18 |
19 | base.OnInspectorGUI();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/DebugLogNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ddced395f90339049931cfd633cd47eb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/Event.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7d3470328b17e52479e3814458875a86
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/Event/EventNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using UnityEditor;
2 |
3 | namespace Gork.Editor
4 | {
5 | ///
6 | /// The base script for and .
7 | ///
8 | public abstract class EventNodeEditor : GorkNodeEditor
9 | {
10 | protected SerializedProperty eventNameProp;
11 |
12 | public abstract GorkGraph.Event.Type EventType { get; }
13 |
14 | public override void SetupEditor()
15 | {
16 | eventNameProp = FindProperty("EventName");
17 | }
18 |
19 | public override void OnRenameEvent(GorkGraph.Event.Type eventType, string oldName, string newName)
20 | {
21 | if (EventType == eventType && eventNameProp.stringValue == oldName)
22 | {
23 | eventNameProp.stringValue = newName;
24 | serializedObject.ApplyModifiedProperties();
25 | }
26 | }
27 |
28 | protected override void OnInspectorGUI()
29 | {
30 | GorkEditorUtility.EventDropdown(eventNameProp.stringValue, Graph.Events, newEvent =>
31 | {
32 | eventNameProp.stringValue = newEvent;
33 | serializedObject.ApplyModifiedProperties();
34 | }, EventType);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/Event/EventNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ff535abeabbcfcf4685ae039a0ef1369
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/Event/ExternalEventNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine.UIElements;
3 |
4 | namespace Gork.Editor
5 | {
6 | ///
7 | ///
8 | ///
9 | [CustomGorkNodeEditor(typeof(ExternalEventNode), Inherit = true)]
10 | public class ExternalEventNodeEditor : EventNodeEditor
11 | {
12 | public override GorkGraph.Event.Type EventType => GorkGraph.Event.Type.External;
13 |
14 | protected override void Draw(List elements)
15 | {
16 | if (Expanded)
17 | {
18 | OnExpand();
19 | }
20 | }
21 |
22 | public override void OnExpand()
23 | {
24 | outputContainer.Add(IMGUIContainer);
25 | }
26 |
27 | public override void OnCollapse()
28 | {
29 | outputContainer.Remove(IMGUIContainer);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/Event/ExternalEventNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 74c946dc409fec1499288075acfce600
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/Event/InternalEventNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine.UIElements;
3 |
4 | namespace Gork.Editor
5 | {
6 | ///
7 | ///
8 | ///
9 | [CustomGorkNodeEditor(typeof(InternalEventNode), Inherit = true)]
10 | public class InternalEventNodeEditor : EventNodeEditor
11 | {
12 | public override GorkGraph.Event.Type EventType => GorkGraph.Event.Type.Internal;
13 |
14 | protected override void Draw(List elements)
15 | {
16 | if (Expanded)
17 | {
18 | OnExpand();
19 | }
20 | }
21 |
22 | public override void OnExpand()
23 | {
24 | inputContainer.Add(IMGUIContainer);
25 | }
26 |
27 | public override void OnCollapse()
28 | {
29 | inputContainer.Remove(IMGUIContainer);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/Event/InternalEventNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 410eb3b6d888b044f8eacfa33ab10bfc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/WaitForSecondsNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEditor;
3 | using UnityEngine.UIElements;
4 |
5 | namespace Gork.Editor
6 | {
7 | ///
8 | /// The node editor for the .
9 | ///
10 | [CustomGorkNodeEditor(typeof(WaitForSecondsNode), Inherit = true)]
11 | public class WaitForSecondsNodeEditor : GorkNodeEditor
12 | {
13 | private WaitForSecondsNode _node;
14 | private SerializedProperty _timeProp;
15 |
16 | public override float InspectorLabelWidth => 30;
17 | public override float InspectorFieldWidth => 70;
18 |
19 | private bool _imguiAttached = true;
20 |
21 | public override void SetupEditor()
22 | {
23 | _node = Node as WaitForSecondsNode;
24 | _timeProp = FindProperty(nameof(_node.Time));
25 |
26 | UpdateTitle(false);
27 | }
28 |
29 | protected override void Draw(List elements)
30 | {
31 | if (HasInputConnection(1))
32 | {
33 | _imguiAttached = false;
34 | return;
35 | }
36 |
37 | base.Draw(elements);
38 | }
39 |
40 | protected override void OnInspectorGUI()
41 | {
42 | SetupInspector();
43 |
44 | EditorGUILayout.Space();
45 |
46 | EditorGUILayout.PropertyField(_timeProp);
47 |
48 | EditorGUILayout.Space();
49 |
50 | // Don't allow numbers below 0
51 | if (_timeProp.floatValue < 0)
52 | {
53 | _timeProp.floatValue = 0;
54 | }
55 |
56 | // Update name when the value of the time is changed
57 | if (serializedObject.ApplyModifiedProperties())
58 | {
59 | UpdateTitle();
60 | }
61 | }
62 |
63 | public override void OnInputConnectionAdded(int portIndex, GorkNode otherNode, int otherNodePortIndex)
64 | {
65 | if (portIndex != 1)
66 | {
67 | return;
68 | }
69 |
70 | if (_imguiAttached)
71 | {
72 | extensionContainer.Remove(IMGUIContainer);
73 | _imguiAttached = false;
74 | }
75 |
76 | UpdateTitle();
77 | }
78 |
79 | public override void OnInputConnectionRemoved(int portIndex, GorkNode otherNode, int otherNodePortIndex)
80 | {
81 | if (portIndex != 1)
82 | {
83 | return;
84 | }
85 |
86 | if (!_imguiAttached)
87 | {
88 | extensionContainer.Add(IMGUIContainer);
89 | NodeView.RefreshExpandedState();
90 | _imguiAttached = true;
91 | }
92 |
93 | UpdateTitle();
94 | }
95 |
96 | private void UpdateTitle(bool updateNode = true)
97 | {
98 | if (HasInputConnection(1))
99 | {
100 | ResetTitle(updateNode);
101 | }
102 | else
103 | {
104 | float time = _timeProp.floatValue;
105 | SetTitle(string.Format(_node.TitleFormat, time, time == 1 ? "" : "s"), updateNode);
106 | }
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Tools/WaitForSecondsNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 34733d39ba74a334596681a0af2339a8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6b65f223f0512574abed7bdfa99349c0
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/BoolValueNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 |
4 | namespace Gork.Editor
5 | {
6 | ///
7 | /// The node editor for the .
8 | ///
9 | [CustomGorkNodeEditor(typeof(BoolValueNode))]
10 | public class BoolValueNodeEditor : ValueNodeEditor
11 | {
12 | public override float InspectorLabelWidth => 1;
13 | public override float InspectorFieldWidth => 40;
14 |
15 | protected override void OnInspectorGUI()
16 | {
17 | SetupInspector();
18 |
19 | Rect rect = EditorGUILayout.GetControlRect();
20 |
21 | rect.x = rect.width / 2 - 7;
22 |
23 | rect.width /= 2;
24 |
25 | valueProp.boolValue = EditorGUI.Toggle(rect, valueProp.boolValue);
26 |
27 | serializedObject.ApplyModifiedProperties();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/BoolValueNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e5304bc14a91195419ace4125aee6b56
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/FloatValueNodeEditor.cs:
--------------------------------------------------------------------------------
1 | namespace Gork.Editor
2 | {
3 | ///
4 | /// The node editor for the .
5 | ///
6 | [CustomGorkNodeEditor(typeof(FloatValueNode))]
7 | public class FloatValueNodeEditor : ValueNodeEditor
8 | {
9 |
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/FloatValueNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 01e1c00b3d9c8e64cbfd48b2e2d12ebb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/IntValueNodeEditor.cs:
--------------------------------------------------------------------------------
1 | namespace Gork.Editor
2 | {
3 | ///
4 | /// The node editor for the .
5 | ///
6 | [CustomGorkNodeEditor(typeof(IntValueNode))]
7 | public class IntValueNodeEditor : ValueNodeEditor
8 | {
9 |
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/IntValueNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 56fea467849778d48a77c3f373114a83
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/Parameter.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e9f718590c027194890070ea80c0ca57
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/Parameter/ParameterNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using UnityEditor;
4 | using UnityEngine;
5 | using UnityEngine.UIElements;
6 |
7 | namespace Gork.Editor
8 | {
9 | ///
10 | /// The node editor for the .
11 | ///
12 | [CustomGorkNodeEditor(typeof(ParameterNode), Inherit = true)]
13 | public class ParameterNodeEditor : GorkNodeEditor
14 | {
15 | private SerializedProperty _parameterNameProp;
16 | private ParameterNode _node;
17 |
18 | public override void SetupEditor()
19 | {
20 | _parameterNameProp = FindProperty("ParameterName");
21 | _node = Node as ParameterNode;
22 | }
23 |
24 | public override void OnRenameParameter(Type parameterType, string oldName, string newName)
25 | {
26 | if (_node.ParameterType == parameterType && _parameterNameProp.stringValue == oldName)
27 | {
28 | _parameterNameProp.stringValue = newName;
29 | serializedObject.ApplyModifiedProperties();
30 | }
31 | }
32 |
33 | protected override void Draw(List elements)
34 | {
35 | if (Expanded)
36 | {
37 | OnExpand();
38 | }
39 | }
40 |
41 | public override void OnExpand()
42 | {
43 | NodeView.inputContainer.Add(IMGUIContainer);
44 | }
45 |
46 | public override void OnCollapse()
47 | {
48 | NodeView.inputContainer.Remove(IMGUIContainer);
49 | }
50 |
51 | protected override void OnInspectorGUI()
52 | {
53 | SetupInspector();
54 |
55 | // Do button
56 | if (!EditorGUILayout.DropdownButton(new GUIContent(_parameterNameProp.stringValue), FocusType.Keyboard))
57 | {
58 | // This is when the button is not pressed
59 | return;
60 | }
61 |
62 | // Button has been pressed
63 |
64 | // Get the name property
65 | string propValue = _parameterNameProp.stringValue;
66 |
67 | // Create an empty generic menu which will be our dropdown menu
68 | GenericMenu menu = new GenericMenu();
69 |
70 | // Loop through all parameters
71 | foreach (GorkGraph.Parameter parameter in Graph.Parameters)
72 | {
73 | // Ignore parameters without the same type
74 | if (parameter.Type != _node.ParameterType)
75 | {
76 | continue;
77 | }
78 |
79 | string name = parameter.Name;
80 | bool on = propValue == name;
81 |
82 | // Add the menu item
83 | menu.AddItem(new GUIContent(name), on, () =>
84 | {
85 | // Do nothing if the parameter is already set to this value
86 | if (on)
87 | {
88 | return;
89 | }
90 |
91 | // Set name value and apply the changes
92 | _parameterNameProp.stringValue = name;
93 | serializedObject.ApplyModifiedProperties();
94 | });
95 | }
96 |
97 | // Display the menu as a dropdown menu at the correct position
98 | Rect rect = EditorGUILayout.GetControlRect();
99 | rect.y += 18;
100 | menu.DropDown(rect);
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/Parameter/ParameterNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c6909b3776262d4fbad0ea1e94c3348
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/StringValueNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using UnityEditor;
3 | using UnityEngine;
4 |
5 | namespace Gork.Editor
6 | {
7 | ///
8 | /// The node editor for the .
9 | ///
10 | [CustomGorkNodeEditor(typeof(StringValueNode))]
11 | public class StringValueNodeEditor : ValueNodeEditor
12 | {
13 | public override float InspectorFieldWidth => 70;
14 |
15 | protected override void OnInspectorGUI()
16 | {
17 | SetupInspector();
18 |
19 | Rect rect = EditorGUILayout.GetControlRect();
20 |
21 | string value = valueProp.stringValue;
22 |
23 | int linebreakCount = value.Count(c => c == '\n');
24 |
25 | float addedHeight = (float)linebreakCount * 14.5f;
26 | rect.height = 18 + addedHeight;
27 |
28 | valueProp.stringValue = EditorGUI.TextArea(rect, value);
29 |
30 | EditorGUILayout.Space(addedHeight);
31 |
32 | serializedObject.ApplyModifiedProperties();
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/StringValueNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 847c9b7855094994db0249b7a3542ba9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/ValueNodeEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEditor;
3 | using UnityEngine;
4 | using UnityEngine.UIElements;
5 |
6 | namespace Gork.Editor
7 | {
8 | ///
9 | /// The base node editor for the all of the .
10 | ///
11 | [CustomGorkNodeEditor(typeof(ValueNode<>), Inherit = true)]
12 | public class ValueNodeEditor : GorkNodeEditor
13 | {
14 | protected SerializedProperty valueProp;
15 | public override float InspectorFieldWidth => 60;
16 |
17 | public override void SetupEditor()
18 | {
19 | valueProp = FindProperty("Value");
20 | }
21 |
22 | protected override void Draw(List elements)
23 | {
24 | if (Expanded)
25 | {
26 | OnExpand();
27 | }
28 | }
29 |
30 | public override void OnExpand()
31 | {
32 | inputContainer.Add(IMGUIContainer);
33 | }
34 |
35 | public override void OnCollapse()
36 | {
37 | inputContainer.Remove(IMGUIContainer);
38 | }
39 |
40 | protected override void OnInspectorGUI()
41 | {
42 | SetupInspector();
43 |
44 | EditorGUILayout.PropertyField(valueProp, GUIContent.none);
45 |
46 | serializedObject.ApplyModifiedProperties();
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Editor/Node Editors/Builtin Nodes/Values/ValueNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 128362fece9b8934b99b6a48f9aa5bdd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Node Editors/GorkNodeEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5fdfd28787b48ad4684ddcca3de92c9a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bdc958d62ea3c5f448cf945485c23aef
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 75f707fb60ed4df4e8aa151766714dee
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/HD Logos.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2efc446c961aa394099eefb034630b17
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/HD Logos/gork_icon_HD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/HD Logos/gork_icon_HD.png
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/HD Logos/gork_icon_HD.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c207ecf8f434dfa438748da41cfc67d4
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 0
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 0
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 16
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 8
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 0
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID: 5e97eb03825dee720800000000000000
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/HD Logos/gork_logo_HD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/HD Logos/gork_logo_HD.png
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/HD Logos/gork_logo_HD.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 85ab55b4c077a3647873d1f873cd10e2
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 0
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 0
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 16
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 8
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 0
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID: 5e97eb03825dee720800000000000000
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/HD Logos/gork_small_logo_HD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/HD Logos/gork_small_logo_HD.png
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/HD Logos/gork_small_logo_HD.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3544362ea1f697a4cac3d28669bbf195
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 0
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 0
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 16
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 8
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 0
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | spriteSheet:
80 | serializedVersion: 2
81 | sprites: []
82 | outline: []
83 | physicsShape: []
84 | bones: []
85 | spriteID: 5e97eb03825dee720800000000000000
86 | internalID: 0
87 | vertices: []
88 | indices:
89 | edges: []
90 | weights: []
91 | secondaryTextures: []
92 | nameFileIdTable: {}
93 | spritePackingTag:
94 | pSDRemoveMatte: 0
95 | pSDShowRemoveMatteOption: 0
96 | userData:
97 | assetBundleName:
98 | assetBundleVariant:
99 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_down_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/gork_down_arrow.png
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_down_arrow.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6ddd4d3e79791a64c964166bea3f80d9
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 0
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 16
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 8
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 0
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | - serializedVersion: 3
80 | buildTarget: Standalone
81 | maxTextureSize: 2048
82 | resizeAlgorithm: 0
83 | textureFormat: -1
84 | textureCompression: 0
85 | compressionQuality: 50
86 | crunchedCompression: 0
87 | allowsAlphaSplitting: 0
88 | overridden: 0
89 | androidETC2FallbackOverride: 0
90 | forceMaximumCompressionQuality_BC6H_BC7: 0
91 | - serializedVersion: 3
92 | buildTarget: Server
93 | maxTextureSize: 2048
94 | resizeAlgorithm: 0
95 | textureFormat: -1
96 | textureCompression: 0
97 | compressionQuality: 50
98 | crunchedCompression: 0
99 | allowsAlphaSplitting: 0
100 | overridden: 0
101 | androidETC2FallbackOverride: 0
102 | forceMaximumCompressionQuality_BC6H_BC7: 0
103 | - serializedVersion: 3
104 | buildTarget: iPhone
105 | maxTextureSize: 2048
106 | resizeAlgorithm: 0
107 | textureFormat: -1
108 | textureCompression: 0
109 | compressionQuality: 50
110 | crunchedCompression: 0
111 | allowsAlphaSplitting: 0
112 | overridden: 0
113 | androidETC2FallbackOverride: 0
114 | forceMaximumCompressionQuality_BC6H_BC7: 0
115 | - serializedVersion: 3
116 | buildTarget: WebGL
117 | maxTextureSize: 2048
118 | resizeAlgorithm: 0
119 | textureFormat: -1
120 | textureCompression: 0
121 | compressionQuality: 50
122 | crunchedCompression: 0
123 | allowsAlphaSplitting: 0
124 | overridden: 0
125 | androidETC2FallbackOverride: 0
126 | forceMaximumCompressionQuality_BC6H_BC7: 0
127 | spriteSheet:
128 | serializedVersion: 2
129 | sprites: []
130 | outline: []
131 | physicsShape: []
132 | bones: []
133 | spriteID: 5e97eb03825dee720800000000000000
134 | internalID: 0
135 | vertices: []
136 | indices:
137 | edges: []
138 | weights: []
139 | secondaryTextures: []
140 | nameFileIdTable: {}
141 | spritePackingTag:
142 | pSDRemoveMatte: 0
143 | pSDShowRemoveMatteOption: 0
144 | userData:
145 | assetBundleName:
146 | assetBundleVariant:
147 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_minimap_hide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/gork_minimap_hide.png
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_minimap_hide.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 992109ee533d1fd4dbadee35bc020d92
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 0
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 32
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 8
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 2
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | - serializedVersion: 3
80 | buildTarget: Standalone
81 | maxTextureSize: 2048
82 | resizeAlgorithm: 0
83 | textureFormat: -1
84 | textureCompression: 0
85 | compressionQuality: 50
86 | crunchedCompression: 0
87 | allowsAlphaSplitting: 0
88 | overridden: 0
89 | androidETC2FallbackOverride: 0
90 | forceMaximumCompressionQuality_BC6H_BC7: 0
91 | - serializedVersion: 3
92 | buildTarget: Server
93 | maxTextureSize: 2048
94 | resizeAlgorithm: 0
95 | textureFormat: -1
96 | textureCompression: 0
97 | compressionQuality: 50
98 | crunchedCompression: 0
99 | allowsAlphaSplitting: 0
100 | overridden: 0
101 | androidETC2FallbackOverride: 0
102 | forceMaximumCompressionQuality_BC6H_BC7: 0
103 | - serializedVersion: 3
104 | buildTarget: iPhone
105 | maxTextureSize: 2048
106 | resizeAlgorithm: 0
107 | textureFormat: -1
108 | textureCompression: 0
109 | compressionQuality: 50
110 | crunchedCompression: 0
111 | allowsAlphaSplitting: 0
112 | overridden: 0
113 | androidETC2FallbackOverride: 0
114 | forceMaximumCompressionQuality_BC6H_BC7: 0
115 | - serializedVersion: 3
116 | buildTarget: WebGL
117 | maxTextureSize: 2048
118 | resizeAlgorithm: 0
119 | textureFormat: -1
120 | textureCompression: 0
121 | compressionQuality: 50
122 | crunchedCompression: 0
123 | allowsAlphaSplitting: 0
124 | overridden: 0
125 | androidETC2FallbackOverride: 0
126 | forceMaximumCompressionQuality_BC6H_BC7: 0
127 | spriteSheet:
128 | serializedVersion: 2
129 | sprites: []
130 | outline: []
131 | physicsShape: []
132 | bones: []
133 | spriteID: 5e97eb03825dee720800000000000000
134 | internalID: 0
135 | vertices: []
136 | indices:
137 | edges: []
138 | weights: []
139 | secondaryTextures: []
140 | nameFileIdTable: {}
141 | spritePackingTag:
142 | pSDRemoveMatte: 0
143 | pSDShowRemoveMatteOption: 0
144 | userData:
145 | assetBundleName:
146 | assetBundleVariant:
147 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_minimap_show.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/gork_minimap_show.png
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_minimap_show.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0c20c0a64f86fe844bcfe7deba3220b5
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 0
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 32
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 8
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 2
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | - serializedVersion: 3
80 | buildTarget: Standalone
81 | maxTextureSize: 2048
82 | resizeAlgorithm: 0
83 | textureFormat: -1
84 | textureCompression: 0
85 | compressionQuality: 50
86 | crunchedCompression: 0
87 | allowsAlphaSplitting: 0
88 | overridden: 0
89 | androidETC2FallbackOverride: 0
90 | forceMaximumCompressionQuality_BC6H_BC7: 0
91 | - serializedVersion: 3
92 | buildTarget: Server
93 | maxTextureSize: 2048
94 | resizeAlgorithm: 0
95 | textureFormat: -1
96 | textureCompression: 0
97 | compressionQuality: 50
98 | crunchedCompression: 0
99 | allowsAlphaSplitting: 0
100 | overridden: 0
101 | androidETC2FallbackOverride: 0
102 | forceMaximumCompressionQuality_BC6H_BC7: 0
103 | - serializedVersion: 3
104 | buildTarget: iPhone
105 | maxTextureSize: 2048
106 | resizeAlgorithm: 0
107 | textureFormat: -1
108 | textureCompression: 0
109 | compressionQuality: 50
110 | crunchedCompression: 0
111 | allowsAlphaSplitting: 0
112 | overridden: 0
113 | androidETC2FallbackOverride: 0
114 | forceMaximumCompressionQuality_BC6H_BC7: 0
115 | - serializedVersion: 3
116 | buildTarget: WebGL
117 | maxTextureSize: 2048
118 | resizeAlgorithm: 0
119 | textureFormat: -1
120 | textureCompression: 0
121 | compressionQuality: 50
122 | crunchedCompression: 0
123 | allowsAlphaSplitting: 0
124 | overridden: 0
125 | androidETC2FallbackOverride: 0
126 | forceMaximumCompressionQuality_BC6H_BC7: 0
127 | spriteSheet:
128 | serializedVersion: 2
129 | sprites: []
130 | outline: []
131 | physicsShape: []
132 | bones: []
133 | spriteID: 5e97eb03825dee720800000000000000
134 | internalID: 0
135 | vertices: []
136 | indices:
137 | edges: []
138 | weights: []
139 | secondaryTextures: []
140 | nameFileIdTable: {}
141 | spritePackingTag:
142 | pSDRemoveMatte: 0
143 | pSDShowRemoveMatteOption: 0
144 | userData:
145 | assetBundleName:
146 | assetBundleVariant:
147 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_question_mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/gork_question_mark.png
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_question_mark.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b7d6612ce9a2168408e2b7dae842f522
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 0
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 24
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 8
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 2
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | - serializedVersion: 3
80 | buildTarget: Standalone
81 | maxTextureSize: 2048
82 | resizeAlgorithm: 0
83 | textureFormat: -1
84 | textureCompression: 0
85 | compressionQuality: 50
86 | crunchedCompression: 0
87 | allowsAlphaSplitting: 0
88 | overridden: 0
89 | androidETC2FallbackOverride: 0
90 | forceMaximumCompressionQuality_BC6H_BC7: 0
91 | - serializedVersion: 3
92 | buildTarget: Server
93 | maxTextureSize: 2048
94 | resizeAlgorithm: 0
95 | textureFormat: -1
96 | textureCompression: 0
97 | compressionQuality: 50
98 | crunchedCompression: 0
99 | allowsAlphaSplitting: 0
100 | overridden: 0
101 | androidETC2FallbackOverride: 0
102 | forceMaximumCompressionQuality_BC6H_BC7: 0
103 | - serializedVersion: 3
104 | buildTarget: iPhone
105 | maxTextureSize: 2048
106 | resizeAlgorithm: 0
107 | textureFormat: -1
108 | textureCompression: 0
109 | compressionQuality: 50
110 | crunchedCompression: 0
111 | allowsAlphaSplitting: 0
112 | overridden: 0
113 | androidETC2FallbackOverride: 0
114 | forceMaximumCompressionQuality_BC6H_BC7: 0
115 | - serializedVersion: 3
116 | buildTarget: WebGL
117 | maxTextureSize: 2048
118 | resizeAlgorithm: 0
119 | textureFormat: -1
120 | textureCompression: 0
121 | compressionQuality: 50
122 | crunchedCompression: 0
123 | allowsAlphaSplitting: 0
124 | overridden: 0
125 | androidETC2FallbackOverride: 0
126 | forceMaximumCompressionQuality_BC6H_BC7: 0
127 | spriteSheet:
128 | serializedVersion: 2
129 | sprites: []
130 | outline: []
131 | physicsShape: []
132 | bones: []
133 | spriteID: 5e97eb03825dee720800000000000000
134 | internalID: 0
135 | vertices: []
136 | indices:
137 | edges: []
138 | weights: []
139 | secondaryTextures: []
140 | nameFileIdTable: {}
141 | spritePackingTag:
142 | pSDRemoveMatte: 0
143 | pSDShowRemoveMatteOption: 0
144 | userData:
145 | assetBundleName:
146 | assetBundleVariant:
147 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_reset_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/gork_reset_icon.png
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_reset_icon.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 42d705cd35a79d746b3a966df17f27a1
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 1
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 1
46 | spriteExtrude: 1
47 | spriteMeshType: 0
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 32
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 8
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 2
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | - serializedVersion: 3
80 | buildTarget: Standalone
81 | maxTextureSize: 2048
82 | resizeAlgorithm: 0
83 | textureFormat: -1
84 | textureCompression: 0
85 | compressionQuality: 50
86 | crunchedCompression: 0
87 | allowsAlphaSplitting: 0
88 | overridden: 0
89 | androidETC2FallbackOverride: 0
90 | forceMaximumCompressionQuality_BC6H_BC7: 0
91 | - serializedVersion: 3
92 | buildTarget: Server
93 | maxTextureSize: 2048
94 | resizeAlgorithm: 0
95 | textureFormat: -1
96 | textureCompression: 0
97 | compressionQuality: 50
98 | crunchedCompression: 0
99 | allowsAlphaSplitting: 0
100 | overridden: 0
101 | androidETC2FallbackOverride: 0
102 | forceMaximumCompressionQuality_BC6H_BC7: 0
103 | - serializedVersion: 3
104 | buildTarget: iPhone
105 | maxTextureSize: 2048
106 | resizeAlgorithm: 0
107 | textureFormat: -1
108 | textureCompression: 0
109 | compressionQuality: 50
110 | crunchedCompression: 0
111 | allowsAlphaSplitting: 0
112 | overridden: 0
113 | androidETC2FallbackOverride: 0
114 | forceMaximumCompressionQuality_BC6H_BC7: 0
115 | - serializedVersion: 3
116 | buildTarget: WebGL
117 | maxTextureSize: 2048
118 | resizeAlgorithm: 0
119 | textureFormat: -1
120 | textureCompression: 0
121 | compressionQuality: 50
122 | crunchedCompression: 0
123 | allowsAlphaSplitting: 0
124 | overridden: 0
125 | androidETC2FallbackOverride: 0
126 | forceMaximumCompressionQuality_BC6H_BC7: 0
127 | spriteSheet:
128 | serializedVersion: 2
129 | sprites: []
130 | outline: []
131 | physicsShape: []
132 | bones: []
133 | spriteID: 5e97eb03825dee720800000000000000
134 | internalID: 0
135 | vertices: []
136 | indices:
137 | edges: []
138 | weights: []
139 | secondaryTextures: []
140 | nameFileIdTable: {}
141 | spritePackingTag:
142 | pSDRemoveMatte: 0
143 | pSDShowRemoveMatteOption: 0
144 | userData:
145 | assetBundleName:
146 | assetBundleVariant:
147 |
--------------------------------------------------------------------------------
/Editor/Resources/Gork Textures/gork_window_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RCJ15/Gork/3b7dd5db9b77912cdb561faead5ab9c6f6b1fa68/Editor/Resources/Gork Textures/gork_window_icon.png
--------------------------------------------------------------------------------
/Editor/Search Windows.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e5736f44b9a29864fabe39a3fdd1ee2a
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Search Windows/GorkAssetSearchWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4301679260c16904f905e178445c07e4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Search Windows/GorkNodeSearchWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fc5158ba745020144ab895f00804e863
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Search Windows/GorkWikiPageSearchWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a8cfac09d400eec4abb54cfb4aec322b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Gork.txt:
--------------------------------------------------------------------------------
1 | Gork is a Node Based system allowing for cool cutscenes in video games.
2 | Gork is created using Unitys extremely underdocumented Graph View API and is built inside of UI Builder.
3 |
4 | Gork used resources online such as this extremely helpful youtube tutorial: https://www.youtube.com/watch?v=nKpM98I7PeM
5 |
6 | Gork also used the following github repositories:
7 | https://github.com/Unity-Technologies/ShaderGraph
8 | https://github.com/Unity-Technologies/UnityCsReference/tree/3fcad4bbbea0455588843799c67861f7b9eb3825/Modules/GraphViewEditor
9 | https://github.com/Wafflus/unity-dialogue-system
--------------------------------------------------------------------------------
/Gork.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 705b5f49920924f4fb853e80e3318f8f
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # IMPORTANT NOTE
2 | This project is currently unfinished.
3 |
4 | # How To Install
5 | 1. Download the repository.
6 | 2. Add the folder into your Unity assets folder.
7 | 3. Done, you can now use Gork to your advantadge.
8 |
9 | # How To Use
10 | Gork uses Scriptable Objects to save it's graphs. In order to get started, right click your projects panel and go to "Create/Gork Graph" to create a new gork graph. You can then call it whatever you want and open it by double clicking.
11 |
12 | ## The Interface
13 | The interface is quite simple. You have a toolbar at the top for a few operations you can do, such as highlighting the file in your projects folder and saving your graph to another file.
14 |
15 | Navigating is also quite simple. If you have used the Animator window or Shader Graph, you'll feel right at home!
16 | Simply hold alt + LMB and move the mouse to navigate, use the scrollwheel to zoom in and out. Click and drag to select nodes in a box.
17 |
18 | ## Nodes
19 | Gork graph uses nodes and is the meat of gork.
20 |
21 | # Custom Nodes
22 | Yes that's right! Gork allows you to create your own custom Gork Nodes!
23 | This section is unfinished...
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 74128f6b9131b0d42aa48bd9e557131c
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 34c3f4ae17c26e241bce448bc70b2d94
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Attributes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 722c512452a61f143ac22d64fd727f45
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Attributes/DontSaveInGorkGraphAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// A that will tell that this Field should not be saved when copying a in the graph editor.
7 | ///
8 | [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
9 | public class DontSaveInGorkGraphAttribute : Attribute
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Attributes/DontSaveInGorkGraphAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 391f256d45896f34f9860893088f341c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkColorAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | #if UNITY_EDITOR
6 | using UnityEditor;
7 | #endif
8 |
9 | namespace Gork
10 | {
11 | ///
12 | /// Modifies the of a Gork Port. This is purely visual and won't affact anything else other than the color.
13 | ///
14 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
15 | public class GorkPortColorAttribute : Attribute
16 | {
17 | private float _r, _g, _b;
18 |
19 | public GorkPortColorAttribute(float r, float g, float b)
20 | {
21 | _r = r;
22 | _g = g;
23 | _b = b;
24 | }
25 |
26 | public GorkPortColorAttribute(string hexadecimal)
27 | {
28 | Color col;
29 |
30 | if (!hexadecimal.StartsWith('#'))
31 | {
32 | hexadecimal = $"#{hexadecimal}";
33 | }
34 |
35 | if (!ColorUtility.TryParseHtmlString(hexadecimal, out col))
36 | {
37 | col = Color.white;
38 | }
39 |
40 | _r = col.r;
41 | _g = col.g;
42 | _b = col.b;
43 | }
44 |
45 | public Color GetColor()
46 | {
47 | return new Color(_r, _g, _b);
48 | }
49 |
50 | #if UNITY_EDITOR
51 | ///
52 | /// A static of all the and all of their attached.
53 | ///
54 | public static readonly Dictionary Attributes = new Dictionary();
55 |
56 | [InitializeOnLoadMethod]
57 | private static void CacheTypes()
58 | {
59 | // Use the TypeCache to loop through all of the Types with the GorkPortColorAttribute attached
60 | foreach (Type type in TypeCache.GetTypesWithAttribute())
61 | {
62 | // Get the attributes
63 | GorkPortColorAttribute attribute = type.GetCustomAttribute();
64 |
65 | // Also add the attribute and type to the Dictionaries
66 | Attributes.Add(type, attribute);
67 | }
68 | }
69 | #endif
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkColorAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4ca000f37d1e11042a94b577c5f96de0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkConverterAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5d28c3e8d8b2a7249a9797758852b4c1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkInputPortAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// Attach this to a script to make an input port appear in the editor.
7 | ///
8 | public class GorkInputPortAttribute : GorkPortAttribute
9 | {
10 | public GorkInputPortAttribute(string displayName) : base(displayName)
11 | {
12 |
13 | }
14 |
15 | public GorkInputPortAttribute(Type portType) : base(portType)
16 | {
17 |
18 | }
19 |
20 | public GorkInputPortAttribute(string displayName, Type portType) : base(displayName, portType)
21 | {
22 |
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkInputPortAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 81e9dbbea75e4ce43bd6da23b3c0dabc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkMenuItemAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c17070d03855a604d924ef784437c3e9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkOutputPortAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// Attach this to a script to make an output port appear in the editor.
7 | ///
8 | public class GorkOutputPortAttribute : GorkPortAttribute
9 | {
10 | public GorkOutputPortAttribute(string displayName) : base(displayName)
11 | {
12 |
13 | }
14 |
15 | public GorkOutputPortAttribute(Type portType) : base(portType)
16 | {
17 |
18 | }
19 |
20 | public GorkOutputPortAttribute(string displayName, Type portType) : base(displayName, portType)
21 | {
22 |
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkOutputPortAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e27d5512a4cd4374e969bee7d0a29355
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkPortAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using System.Reflection;
4 | using System.Collections.Generic;
5 | #if UNITY_EDITOR
6 | using UnityEditor;
7 | #endif
8 |
9 | namespace Gork
10 | {
11 | ///
12 | /// The base class for adding a to a .
13 | /// You shouldn't use this by itself and instead use or .
14 | ///
15 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
16 | public abstract class GorkPortAttribute : Attribute
17 | {
18 | ///
19 | /// The display name of the port in the editor.
20 | ///
21 | public string DisplayName => _displayName;
22 | protected string _displayName = null;
23 |
24 | ///
25 | /// The type of the port.
26 | ///
27 | public Type PortType => _portType;
28 | protected Type _portType = null;
29 |
30 | ///
31 | /// The order of how the port attributes on this node are placed. Is -1 by default.
32 | ///
33 | public int Order = -1;
34 |
35 | protected GorkPortAttribute()
36 | {
37 |
38 | }
39 |
40 | protected GorkPortAttribute(string displayName) : this()
41 | {
42 | _displayName = displayName;
43 | }
44 |
45 | protected GorkPortAttribute(Type portType) : this()
46 | {
47 | _portType = portType;
48 | }
49 |
50 | protected GorkPortAttribute(string displayName, Type portType) : this(displayName)
51 | {
52 | _portType = portType;
53 | }
54 |
55 | ///
56 | /// A static of all the and all of their attached .
57 | ///
58 | public static readonly Dictionary> Attributes = new Dictionary>();
59 |
60 | #if UNITY_EDITOR
61 | [InitializeOnLoadMethod]
62 | #else
63 | [RuntimeInitializeOnLoadMethod]
64 | #endif
65 | private static void CacheTypes()
66 | {
67 | // Loop through every single assembly in the application
68 | foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
69 | {
70 | // Loop through every single type in the assembly
71 | foreach (Type type in assembly.GetTypes())
72 | {
73 | // Get every port attribute attached to the type
74 | IEnumerable portAttributes = type.GetCustomAttributes();
75 |
76 | // The type has no port attributes :(
77 | if (portAttributes == null || !portAttributes.Any())
78 | {
79 | continue;
80 | }
81 |
82 | // Add the enumerable and port to the dicitonary
83 | Attributes.Add(type, portAttributes.OrderBy(attribute => attribute.Order));
84 | }
85 | //-- Type loop is done
86 | }
87 | //-- Assembly loop is done
88 | }
89 |
90 | ///
91 | /// A simple container class that contains info about a singular .
92 | /// In reality, it just contains a reference to the and it's attached .
93 | ///
94 | public class Info
95 | {
96 | public GorkPortAttribute Attribute;
97 | public MemberInfo Member;
98 |
99 | public Info(GorkPortAttribute attribute, MemberInfo member)
100 | {
101 | Attribute = attribute;
102 | Member = member;
103 | }
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkPortAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9db2b831165bfd046a0e8f786dd772f3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Attributes/GorkWikiInfoAttribute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e513acb0d9807f84a9fbe1cf4543aaa0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/BaseGorkConvertions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace Gork
6 | {
7 | ///
8 | /// Has the base Gork Conversions for Float to Int and Int to Float.
9 | /// Use this as an example of how to create your own Gork Conversions.
10 | /// See: .
11 | ///
12 | [GorkConverter]
13 | public class BaseGorkConvertions
14 | {
15 | ///
16 | /// Float to Int convertion.
17 | ///
18 | [GorkConverter]
19 | public static int FloatToInt(float val)
20 | {
21 | return Mathf.RoundToInt(val);
22 | }
23 |
24 | ///
25 | /// Int to Float convertion.
26 | ///
27 | [GorkConverter]
28 | public static float IntToFloat(int val)
29 | {
30 | return val;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Runtime/BaseGorkConvertions.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d8b5b0b47dcfbf346969e842550468eb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Gork.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Gork",
3 | "rootNamespace": "Gork",
4 | "references": [],
5 | "includePlatforms": [],
6 | "excludePlatforms": [],
7 | "allowUnsafeCode": false,
8 | "overrideReferences": false,
9 | "precompiledReferences": [],
10 | "autoReferenced": true,
11 | "defineConstraints": [],
12 | "versionDefines": [],
13 | "noEngineReferences": false
14 | }
--------------------------------------------------------------------------------
/Runtime/Gork.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd0bfb71c18a4cc47aa4ff32fc71b632
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/GorkGraphReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d549b4d4a8b17a74785e4da5e1cbfaf7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/GorkUtility.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5056c2a2dff1dd147bae4f36e260c2fc
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 50a2a4dd15abe5647adcec5ed08ce60e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ff9b932257a3161408a067ad2c55014c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d8e586f0b5ca6e742b9144a8865b6731
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue/DialogueNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using UnityEngine;
3 |
4 | namespace Gork
5 | {
6 | ///
7 | /// The base class for a that will start some dialogue.
8 | ///
9 | [GorkInputPort("Trigger")]
10 | public abstract class DialogueNode : GorkNode where T : DialogueLine
11 | {
12 | protected bool awaitingDialogue = false;
13 |
14 | protected abstract T GetDialogueLine();
15 | protected T dialogueLine;
16 |
17 | public override IEnumerator ProcessIEnumerator(int port)
18 | {
19 | dialogueLine = GetDialogueLine();
20 |
21 | awaitingDialogue = true;
22 |
23 | yield return new WaitUntil(() => !awaitingDialogue);
24 | }
25 |
26 | ///
27 | /// Call this when the dialogue is done. Preferably from subsribing to your dialogue lines.
28 | ///
29 | protected virtual void DoneDialogue()
30 | {
31 | awaitingDialogue = false;
32 |
33 | dialogueLine = null;
34 | }
35 |
36 | public override void OnStopped()
37 | {
38 | awaitingDialogue = false;
39 |
40 | dialogueLine = null;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue/DialogueNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e3975ee6781a6d84ca2d137d185228bf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue/GorkDialogueLine.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e271a9bc7655eab45851ea0db8f781c4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue/GorkDialogueProvider.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 87d900540acca194b990fea6ee4318fd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue/MultiChoiceDialogueNode.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// A that will start a multi choice option list.
7 | ///
8 | [GorkMenuItem("Dialogue/Multi Choice Dialogue", GorkColors.DIALOGUE_COLOR, Order = 1)]
9 | public class MultiChoiceDialogueNode : DialogueNode
10 | {
11 | [GorkWikiInfo("An array of string that represent the choices that the player will be able to choose from")]
12 | [TextArea(1, 5)]
13 | public string[] Choices = new string[] { "Yes", "No" };
14 |
15 | private bool _awaitingDialogue = false;
16 | private DialogueLineChoice _lineChoice;
17 |
18 | private void SelectedChoice(int choice)
19 | {
20 | _awaitingDialogue = false;
21 |
22 | _lineChoice = null;
23 |
24 | if (!HasOutputConnection(choice))
25 | {
26 | return;
27 | }
28 |
29 | CallPort(choice);
30 | }
31 |
32 | public override void OnStopped()
33 | {
34 | base.OnStopped();
35 |
36 | if (_lineChoice != null)
37 | {
38 | _lineChoice.OnFinish -= SelectedChoice;
39 | }
40 | }
41 |
42 | protected override DialogueLineChoice GetDialogueLine()
43 | {
44 | return GorkDialogueProvider.AppendChoiceDialogue(Choices, SelectedChoice);
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue/MultiChoiceDialogueNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 34aeb47da43d04d449eba5ed32684b03
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue/SingleLineDialogueNode.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// A that will simply start some dialogue
7 | ///
8 | [GorkMenuItem("Dialogue/Single Line Dialogue", GorkColors.DIALOGUE_COLOR, Order = 0)]
9 | [GorkInputPort("Input", typeof(string), Order = 1)]
10 | [GorkOutputPort("When Done")]
11 | public class SingleLineDialogueNode : DialogueNode
12 | {
13 | [GorkWikiInfo("The text that will be displayed in the GorkDialogueProvider.")]
14 | [TextArea(5, 20)]
15 | public string Text = "Insert dialogue text here...";
16 |
17 | protected override DialogueLineText GetDialogueLine()
18 | {
19 | bool nextLineIsChoiceLine = HasOutputConnection(0) && OutputConnections[0].Connections[0].Node is MultiChoiceDialogueNode;
20 |
21 | return GorkDialogueProvider.AppendTextDialogue(HasInputConnection(1) ? GetValueFromPort(1) : Text, DoneDialogue, nextLineIsChoiceLine);
22 | }
23 |
24 | public override void OnStopped()
25 | {
26 | base.OnStopped();
27 |
28 | if (dialogueLine != null)
29 | {
30 | dialogueLine.OnFinish -= DoneDialogue;
31 | }
32 |
33 | CallPort(0);
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Dialogue/SingleLineDialogueNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9fab3f61432f3b84b878fb37d4654cbe
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e66f9ddd88153a24f8f757439611a7c4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/DisruptNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// Will stop all that have a certain tag
7 | ///
8 | [GorkMenuItem("Entries & Exits/Disrupt Node", GorkColors.ENTRY_COLOR, Order = 2)]
9 | [GorkInputPort("Trigger")]
10 | public class DisruptNode : GorkNode
11 | {
12 | [GorkWikiInfo("The tag that will determine which nodes to stop.\nIs displayed like a dropdown in the editor")]
13 | public string Tag = "No Tag";
14 |
15 | public override void Process(int port)
16 | {
17 | // Stop all nodes with the set tag
18 | List nodes = Graph.GetNodesWithTag(Tag);
19 |
20 | // No nodes with that tag :(
21 | if (nodes == null)
22 | {
23 | return;
24 | }
25 |
26 | foreach (GorkNode node in nodes)
27 | {
28 | Graph.OnNodeStop(node);
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/DisruptNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f99a1deafe330584d9aa3556fb0e688d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/StartNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// Sends a signal to it's output port as soon as the is started.
5 | ///
6 | [GorkMenuItem("Entries & Exits/Start", GorkColors.ENTRY_COLOR, Order = 0)]
7 | [GorkOutputPort("Start Port")]
8 | public class StartNode : GorkNode
9 | {
10 |
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/StartNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: af57ae8c8ef2918469bc6d3ad1c6f49f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/StopNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// Will stop all currently active nodes in the when triggered.
5 | ///
6 | [GorkMenuItem("Entries & Exits/Stop", GorkColors.ENTRY_COLOR, Order = 1)]
7 | [GorkInputPort("Trigger")]
8 | public class StopNode : GorkNode
9 | {
10 | public override void Process(int port)
11 | {
12 | Graph.OnGraphStop.Invoke();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/StopNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: db9e59b5f5e81204999cd3b59a7e9768
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/WormholeEntryNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// A node that will transport it's signal to a with the same tag. Use this to fix spaghetti connections and create pseudo "functions" in your graphs
7 | ///
8 | [GorkMenuItem("Entries & Exits/Wormhole Entry", GorkColors.WORMHOLE_COLOR, Order = 10)]
9 | [GorkInputPort("Signal")]
10 | public class WormholeEntryNode : GorkNode
11 | {
12 | [GorkWikiInfo("The tag that will determine which Wormhole Exit nodes to call.\nIs displayed like a dropdown in the editor")]
13 | public string Tag = "";
14 |
15 | public override void Process(int port)
16 | {
17 | List exitNodes;
18 |
19 | // Tag is empty, which means that we activate ALL Wormhole Exit nodes in the entire graph
20 | if (string.IsNullOrEmpty(Tag))
21 | {
22 | exitNodes = Graph.GetNodesOfType();
23 | }
24 | // Otherwise just search for Wormhole Exit nodes with the corresponding tag
25 | else
26 | {
27 | exitNodes = Graph.GetNodesWithTag(Tag);
28 | }
29 |
30 | // No nodes :(
31 | if (exitNodes == null)
32 | {
33 | return;
34 | }
35 |
36 | foreach (WormholeExitNode node in exitNodes)
37 | {
38 | Graph.OnNodeCalled.Invoke(node, 0);
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/WormholeEntryNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8f7ec525c79420b42a440cc9fcd68d76
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/WormholeExitNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// A node that will receive a signal from a with the same key. Use this to fix spaghetti connections and create reusable "functions" in your graphs.
5 | ///
6 | [GorkMenuItem("Entries & Exits/Wormhole Exit", GorkColors.WORMHOLE_COLOR, Order = 11)]
7 | [GorkOutputPort("Signal")]
8 | public class WormholeExitNode : GorkNode
9 | {
10 |
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Entries & Exits/WormholeExitNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f32f077dff76ba745a3503953da76731
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7761405e7e5f2354ab92df49fad2190d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/AndLogicGateNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// Allows usage of the AND logic gate.
5 | ///
6 | [GorkMenuItem("Logic/Logic Gate (AND)", GorkColors.BOOL_COLOR, Order = 1)]
7 | public class AndLogicGateNode : LogicGateNode
8 | {
9 | public override string Title => "AND";
10 |
11 | public override bool Operation(bool value1, bool value2) => value1 && value2;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/AndLogicGateNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59fb9602b344d484ca633defa547e6c5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/IfNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// Will check if the input statement is true or false and will trigger another connected based on the result.
5 | /// This node requires a signal first through the "Trigger" input port before the connected is triggered.
6 | ///
7 | [GorkMenuItem("Logic/If", GorkColors.TOOL_COLOR, Order = 0)]
8 | [GorkInputPort("Trigger")]
9 | [GorkInputPort("Statement", typeof(bool))]
10 | [GorkOutputPort("True")]
11 | [GorkOutputPort("False")]
12 | public class IfNode : GorkNode
13 | {
14 | public override void Process(int port)
15 | {
16 | if (GetValueFromPort(1))
17 | {
18 | // True
19 | CallPort(0);
20 | }
21 | else
22 | {
23 | // False
24 | CallPort(1);
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/IfNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 142062900394d454088ca0c62f26ceb0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/LogicGateNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// The base script for the 3 logic gate nodes: AND, OR and XOR.
5 | ///
6 | [GorkInputPort("X", typeof(bool))]
7 | [GorkInputPort("Y", typeof(bool))]
8 | [GorkOutputPort("Result", typeof(bool))]
9 | public abstract class LogicGateNode : GorkNode
10 | {
11 | public override bool BoolCall(int port)
12 | {
13 | bool value1 = GetValueFromPort(0);
14 | bool value2 = GetValueFromPort(1);
15 |
16 | return Operation(value1, value2);
17 | }
18 |
19 | public abstract bool Operation(bool value1, bool value2);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/LogicGateNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d53853f96e15fd1449d844d75bb4da04
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/OrLogicGateNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// Allows usage of the OR logic gate.
5 | ///
6 | [GorkMenuItem("Logic/Logic Gate (OR)", GorkColors.BOOL_COLOR, Order = 2)]
7 | public class OrLogicGateNode : LogicGateNode
8 | {
9 | public override string Title => "OR";
10 |
11 | public override bool Operation(bool value1, bool value2) => value1 || value2;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/OrLogicGateNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 810ec0a4c76cb7149bcded481096fe07
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/XorLogicGateNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// Allows usage of the XOR logic gate.
5 | ///
6 | [GorkMenuItem("Logic/Logic Gate (XOR)", GorkColors.BOOL_COLOR, Order = 3)]
7 | public class XorLogicGateNode : LogicGateNode
8 | {
9 | public override string Title => "XOR";
10 |
11 | public override bool Operation(bool value1, bool value2) => value1 ^ value2;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Logic/XorLogicGateNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6552d64e8e0246247a0f2d7169414d5d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2da6e21b4600e30408eceea39251d54b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/BoolInvertNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// Will simply invert a from true to false or false to true.
5 | ///
6 | [GorkMenuItem("Operations/Bool Invert", GorkColors.BOOL_COLOR, Order = 99)]
7 | [GorkInputPort("", typeof(bool))]
8 | [GorkOutputPort("", typeof(bool))]
9 | public class BoolInvertNode : GorkNode
10 | {
11 | public override bool BoolCall(int port)
12 | {
13 | return !GetValueFromPort(0);
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/BoolInvertNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 19e4175cb792ada47a45cbde18bfe43e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4a446ac6be6f4da4fb60e5c5714e4c65
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/EqualsNode.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// Compares both of it's input's and gives out a value if the values are equal to eachother.
7 | ///
8 | [GorkMenuItem("Operations/Comparisons/Equals (==)", GorkColors.BOOL_COLOR, Order = -6)]
9 | [GorkInputPort("X", typeof(object))]
10 | [GorkInputPort("Y", typeof(object))]
11 | [GorkOutputPort("Result", typeof(bool))]
12 | public class EqualsNode : GorkNode
13 | {
14 | [DontSaveInGorkGraph] [SerializeField] private string comparisonTypeName;
15 |
16 | public override bool BoolCall(int port)
17 | {
18 | object obj1 = GetValueFromPort(0);
19 | object obj2 = GetValueFromPort(1);
20 |
21 | return ModifyResult(obj1.Equals(obj2));
22 | }
23 |
24 | public virtual bool ModifyResult(bool result) => result;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/EqualsNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f1f89b378e0bae849b9193c44af04e03
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/NotEqualsNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// A variant of the that does the same except inverted.
5 | ///
6 | [GorkMenuItem("Operations/Comparisons/Not Equals (!=)", GorkColors.BOOL_COLOR, Order = -5)]
7 | public class NotEqualsNode : EqualsNode
8 | {
9 | public override bool ModifyResult(bool result) => !result;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/NotEqualsNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 326b1010113bff14493e8b01185e778a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c35638e99601c194c979f73102eeaa53
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/GreaterEqualsComparisonNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// X >= Y
5 | ///
6 | [GorkMenuItem("Operations/Comparisons/Greater Equals (>=)", GorkColors.FLOAT_COLOR, Order = -2)]
7 | public class GreaterEqualsComparisonNode : NumberComparisonNode
8 | {
9 | public override bool Operation(float value1, float value2) => value1 >= value2;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/GreaterEqualsComparisonNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 183f7446d5883484380030996e7fd74c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/GreaterThanComparisonNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// X > Y
5 | ///
6 | [GorkMenuItem("Operations/Comparisons/Greater Than (>)", GorkColors.FLOAT_COLOR, Order = -4)]
7 | public class GreaterThanComparisonNode : NumberComparisonNode
8 | {
9 | public override bool Operation(float value1, float value2) => value1 > value2;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/GreaterThanComparisonNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 940d8273d6e268c478d7be581b99c820
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/NumberComparisonNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace Gork
6 | {
7 | ///
8 | ///
9 | ///
10 | [GorkInputPort("X", typeof(float))]
11 | [GorkInputPort("Y", typeof(float))]
12 | [GorkOutputPort("Result", typeof(bool))]
13 | public abstract class NumberComparisonNode : GorkNode
14 | {
15 | public override bool BoolCall(int port)
16 | {
17 | float value1 = GetValueFromPort(0);
18 | float value2 = GetValueFromPort(1);
19 |
20 | return Operation(value1, value2);
21 | }
22 |
23 | public abstract bool Operation(float value1, float value2);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/NumberComparisonNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d0754990dda8cc24fa589d027f105d41
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/SmallerEqualsComparisonNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// X <= Y
5 | ///
6 | [GorkMenuItem("Operations/Comparisons/Smaller Equals (<=)", GorkColors.FLOAT_COLOR, Order = -1)]
7 | public class SmallerEqualsComparisonNode : NumberComparisonNode
8 | {
9 | public override bool Operation(float value1, float value2) => value1 <= value2;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/SmallerEqualsComparisonNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ca1b59e052955f64ab4cb825ce53335f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/SmallerThanComparisonNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// X < Y
5 | ///
6 | [GorkMenuItem("Operations/Comparisons/Smaller Than (<)", GorkColors.FLOAT_COLOR, Order = -3)]
7 | public class SmallerThanComparisonNode : NumberComparisonNode
8 | {
9 | public override bool Operation(float value1, float value2) => value1 < value2;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Comparison/Number Comparsion/SmallerThanComparisonNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dae8d1a3a302b4e408bbb5cad8485bdd
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1ecd3018d0c023b468b631f8eb4f952e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/AddNumberNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// 1 + 1 = 2
5 | ///
6 | [GorkMenuItem("Operations/Add Number", GorkColors.FLOAT_COLOR, Order = 0)]
7 | public class AddNumberNode : NumberOperationNode
8 | {
9 | public override string Title => "Addition";
10 |
11 | public override float Operation(float value1, float value2) => value1 + value2;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/AddNumberNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1cbc7cd819a15474aa06701ac9113eab
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/DivideNumberNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// 4 / 2 = 2
5 | ///
6 | [GorkMenuItem("Operations/Divide Number", GorkColors.FLOAT_COLOR, Order = 3)]
7 | public class DivideNumberNode : NumberOperationNode
8 | {
9 | public override string Title => "Division";
10 |
11 | public override float Operation(float value1, float value2) => value1 / value2;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/DivideNumberNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1f2481bf4075ea1448deff29c12ffce1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/MultiplyNumberNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// 2 * 2 = 4
5 | ///
6 | [GorkMenuItem("Operations/Multiply Number", GorkColors.FLOAT_COLOR, Order = 2)]
7 | public class MultiplyNumberNode : NumberOperationNode
8 | {
9 | public override string Title => "Multiplication";
10 |
11 | public override float Operation(float value1, float value2) => value1 * value2;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/MultiplyNumberNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fed414149e530b74c8e761246321bd37
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/NumberOperationNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// The base class for the 4 nodes that allow usage of addition, subtraction, multiplication & division.
5 | ///
6 | [GorkInputPort("X", typeof(float))]
7 | [GorkInputPort("Y", typeof(float))]
8 | [GorkOutputPort("Result", typeof(float))]
9 | public abstract class NumberOperationNode : GorkNode
10 | {
11 | public override float FloatCall(int port) => Operation(GetValueFromPort(0), GetValueFromPort(1));
12 |
13 | public abstract float Operation(float value1, float value2);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/NumberOperationNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 20b6b2b3f7f5abf4d83e77b9caa9467a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/SubtractNumberNode.cs:
--------------------------------------------------------------------------------
1 | namespace Gork
2 | {
3 | ///
4 | /// 2 - 1 = 1
5 | ///
6 | [GorkMenuItem("Operations/Subtract Number", GorkColors.FLOAT_COLOR, Order = 1)]
7 | public class SubtractNumberNode : NumberOperationNode
8 | {
9 | public override string Title => "Subtraction";
10 |
11 | public override float Operation(float value1, float value2) => value1 - value2;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Number Operation/SubtractNumberNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e3babde6a27b5be4aa43e04fbd3a4c2f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Rounding.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b577c8652975b54fa161c009fb48c21
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Rounding/CeilNumberNode.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// Rounds a number to a integer using the Ceil rounding method: .
7 | ///
8 | [GorkMenuItem("Operations/Rounding/Ceil", GorkColors.INT_COLOR, Order = 2)]
9 | public class CeilNumberNode : RoundNumberNode
10 | {
11 | public override int Operation(float value) => Mathf.CeilToInt(value);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Rounding/CeilNumberNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: af850d4f30f0c45469928a81861cbf7f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Rounding/FloorNumberNode.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// Rounds a number to a integer using the Floor rounding method: .
7 | ///
8 | [GorkMenuItem("Operations/Rounding/Floor", GorkColors.INT_COLOR, Order = 1)]
9 | public class FloorNumberNode : RoundNumberNode
10 | {
11 | public override int Operation(float value) => Mathf.FloorToInt(value);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Rounding/FloorNumberNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6893486f7f6d13940af0769c0103fc91
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Rounding/RoundNumberNode.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// Rounds a number to a integer using the regular rounding method: .
7 | ///
8 | [GorkMenuItem("Operations/Rounding/Round", GorkColors.INT_COLOR, Order = 0)]
9 | [GorkInputPort("", typeof(float))]
10 | [GorkOutputPort("", typeof(int))]
11 | public class RoundNumberNode : GorkNode
12 | {
13 | public override int IntCall(int port) => Operation(GetValueFromPort(0));
14 |
15 | public virtual int Operation(float value) => Mathf.RoundToInt(value);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/Rounding/RoundNumberNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9c0cc41d931431c4588327143fec54f0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/StringFormatNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 |
4 | namespace Gork
5 | {
6 | ///
7 | /// Uses and will give the output of the method.
8 | /// This node will automatically detect if you have put a "{0}" or "{391}" in your text and will add dynamically add an input port for each unique "{0}" it can find.
9 | ///
10 | [GorkMenuItem("Operations/String Format", GorkColors.STRING_COLOR, Order = 100)]
11 | //[GorkInputPort("Input", typeof(string))]
12 | [GorkOutputPort("Result", typeof(string))]
13 | public class StringFormatNode : GorkNode
14 | {
15 | [GorkWikiInfo("The format that this node is going to use.\nEach unique argument present in this string will create a new string input port that corresponds to one of the arguments in this string")]
16 | [TextArea(3, 6)]
17 | public string Format = "Insert a formatted string here using: {0} or {1}";
18 | [SerializeField] private int highestArgId = 0;
19 | [SerializeField] private int argCount;
20 | [SerializeField] private List argIds = new List();
21 |
22 | public override string StringCall(int port)
23 | {
24 | string[] args = new string[highestArgId + 1];
25 |
26 | for (int i = 0; i < argCount; i++)
27 | {
28 | if (!HasInputConnection(i))
29 | {
30 | continue;
31 | }
32 |
33 | int argId = argIds[i];
34 | args[argId] = GetValueFromPort(i);
35 | }
36 |
37 | return string.Format(Format, args);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Operations/StringFormatNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0a7d7e72e125ce24790d3472510831c9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 78053f56e5612464ab29bc05406027aa
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 226c234eca3d9974aa9baef1a0dd7439
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/CoroutineNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | ///
7 | ///
8 | [GorkInputPort("Trigger")]
9 | [GorkOutputPort("When Done")]
10 | public abstract class CoroutineNode : GorkNode
11 | {
12 | public override IEnumerator ProcessIEnumerator(int port)
13 | {
14 | yield return CoroutineOperation();
15 |
16 | CallPort(port);
17 | }
18 |
19 | public abstract IEnumerator CoroutineOperation();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/CoroutineNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c25df2a418f8d37459c2a64c578039ca
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitForEndOfFrameNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using UnityEngine;
3 |
4 | namespace Gork
5 | {
6 | ///
7 | /// Waits for a single or mutliple frames before triggering it's connected node.
8 | ///
9 | [GorkMenuItem("Tools/Coroutine/Wait For End Of Frame...", GorkColors.COROUTINE_COLOR, Order = 4)]
10 | [GorkInputPort("Frame Amount", typeof(int), Order = 1)]
11 | public class WaitForEndOfFrameNode : CoroutineNode
12 | {
13 | private static readonly WaitForEndOfFrame _cachedWait = new WaitForEndOfFrame();
14 |
15 | public override IEnumerator CoroutineOperation()
16 | {
17 | // Check if we have input
18 | if (HasInputConnection(1))
19 | {
20 | int frameAmount = GetValueFromPort(1);
21 |
22 | // If so, then we wait for a certain amount of frames
23 | for (int i = 0; i < frameAmount; i++)
24 | {
25 | yield return _cachedWait;
26 | }
27 | }
28 | // If not, then we just wait for one singular frame
29 | else
30 | {
31 | yield return _cachedWait;
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitForEndOfFrameNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 37bc2e8a044e4a8428a1c688fb6db407
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitForFixedUpdateNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using UnityEngine;
3 |
4 | namespace Gork
5 | {
6 | ///
7 | /// Waits for a single or mutliple fixed updates before triggering it's connected node.
8 | ///
9 | [GorkMenuItem("Tools/Coroutine/Wait For Fixed Update...", GorkColors.COROUTINE_COLOR, Order = 5)]
10 | [GorkInputPort("Frame Amount", typeof(int), Order = 1)]
11 | public class WaitForFixedUpdateNode : CoroutineNode
12 | {
13 | private static readonly WaitForFixedUpdate _cachedWait = new WaitForFixedUpdate();
14 |
15 | public override IEnumerator CoroutineOperation()
16 | {
17 | // Check if we have input
18 | if (HasInputConnection(1))
19 | {
20 | int frameAmount = GetValueFromPort(1);
21 |
22 | // If so, then we wait for a certain amount of frames
23 | for (int i = 0; i < frameAmount; i++)
24 | {
25 | yield return _cachedWait;
26 | }
27 | }
28 | // If not, then we just wait for one singular frame
29 | else
30 | {
31 | yield return _cachedWait;
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitForFixedUpdateNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 01f3a1e9ebf3e9249b8be6df2348d7df
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitForSecondsNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace Gork
6 | {
7 | ///
8 | /// A that will simply wait for a specified amount of time.
9 | ///
10 | [GorkMenuItem("Tools/Coroutine/Wait...", GorkColors.COROUTINE_COLOR, Order = 0)]
11 | [GorkInputPort("Time", typeof(float), Order = 1)]
12 | public class WaitForSecondsNode : CoroutineNode
13 | {
14 | private static Dictionary _waitForSeconsCache = new Dictionary();
15 |
16 | public virtual string TitleFormat => "Wait For {0} Second{1}...";
17 |
18 | [GorkWikiInfo("The amount of time to wait in seconds. Will be overriden by the time input port if something is connected to it")]
19 | public float Time = 1;
20 |
21 | public override IEnumerator CoroutineOperation()
22 | {
23 | if (HasInputConnection(1))
24 | {
25 | return WaitOperation(GetValueFromPort(1));
26 | }
27 | else
28 | {
29 | return WaitOperation(Time);
30 | }
31 | }
32 |
33 | public virtual IEnumerator WaitOperation(float time)
34 | {
35 | if (!_waitForSeconsCache.ContainsKey(time))
36 | {
37 | _waitForSeconsCache[time] = new WaitForSeconds(time);
38 | }
39 |
40 | yield return _waitForSeconsCache[time];
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitForSecondsNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 116749ce12bd28549836f5e59bcc3279
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitForSecondsRealtimeNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace Gork
6 | {
7 | ///
8 | /// A variant of the that uses instead of .
9 | ///
10 | [GorkMenuItem("Tools/Coroutine/Wait Realtime...", GorkColors.COROUTINE_COLOR, Order = 1)]
11 | public class WaitForSecondsRealtimeNode : WaitForSecondsNode
12 | {
13 | private static Dictionary _waitForSeconsRealtimeCache = new Dictionary();
14 |
15 | public override string TitleFormat => "Wait For {0} Second{1} Realtime...";
16 |
17 | public override IEnumerator WaitOperation(float time)
18 | {
19 | if (!_waitForSeconsRealtimeCache.ContainsKey(time))
20 | {
21 | _waitForSeconsRealtimeCache[time] = new WaitForSecondsRealtime(time);
22 | }
23 |
24 | yield return _waitForSeconsRealtimeCache[time];
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitForSecondsRealtimeNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8f5963e9c8e68d944910045add8a91a4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitUntilNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using UnityEngine;
3 |
4 | namespace Gork
5 | {
6 | ///
7 | /// Waits Until a input signal is true and will trigger it's connected node when finished.
8 | ///
9 | [GorkMenuItem("Tools/Coroutine/Wait Until...", GorkColors.COROUTINE_COLOR, Order = 2)]
10 | [GorkInputPort("Value", typeof(bool), Order = 1)]
11 | public class WaitUntilNode : CoroutineNode
12 | {
13 | public override IEnumerator CoroutineOperation() => new WaitUntil(() => GetValueFromPort(1));
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitUntilNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 38812d748cb473746bfa0be6a763045f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitWhileNode.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using UnityEngine;
3 |
4 | namespace Gork
5 | {
6 | ///
7 | /// Waits While a input signal is true and will trigger it's connected node when finished.
8 | ///
9 | [GorkMenuItem("Tools/Coroutine/Wait While...", GorkColors.COROUTINE_COLOR, Order = 3)]
10 | [GorkInputPort("Value", typeof(bool), Order = 1)]
11 | public class WaitWhileNode : CoroutineNode
12 | {
13 | public override IEnumerator CoroutineOperation() => new WaitWhile(() => GetValueFromPort(1));
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/Coroutine/WaitWhileNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6d9407adc1f653c489578ef43e16b252
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/Nodes/Builtin Nodes/Tools/DebugLogNode.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Gork
4 | {
5 | ///
6 | /// A that will simply print out a message in the console using .
7 | ///
8 | [GorkMenuItem("Tools/Debug Log", GorkColors.TOOL_COLOR, Order = 0)]
9 | [GorkInputPort("Trigger")]
10 | [GorkInputPort("Data", typeof(object))]
11 | public class DebugLogNode : GorkNode
12 | {
13 | [GorkWikiInfo("What this node will print out in the console.\nWill be overwritten by the Data input port if another node is connected to it", DisplayName = "Log Text")]
14 | [TextArea(1, 5)]
15 | public string LogText = "Hello Gorld!";
16 |
17 | public override void Process(int port)
18 | {
19 | // Debug Log
20 | if (HasInputConnection(1))
21 | {
22 | Debug.Log(GetValueFromPort