parent
7de3b8158c
commit
a24331dc2e
12 changed files with 157 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||||||
|
%YAML 1.1 |
||||||
|
%TAG !u! tag:unity3d.com,2011: |
||||||
|
--- !u!114 &11400000 |
||||||
|
MonoBehaviour: |
||||||
|
m_ObjectHideFlags: 0 |
||||||
|
m_CorrespondingSourceObject: {fileID: 0} |
||||||
|
m_PrefabInstance: {fileID: 0} |
||||||
|
m_PrefabAsset: {fileID: 0} |
||||||
|
m_GameObject: {fileID: 0} |
||||||
|
m_Enabled: 1 |
||||||
|
m_EditorHideFlags: 0 |
||||||
|
m_Script: {fileID: 11500000, guid: cde084f079a7426daa86ed86cb80ed1b, type: 3} |
||||||
|
m_Name: HelloEditor |
||||||
|
m_EditorClassIdentifier: |
||||||
|
nodeData: |
||||||
|
rid: -2 |
||||||
|
nodePos: |
||||||
|
serializedVersion: 2 |
||||||
|
x: 0 |
||||||
|
y: 0 |
||||||
|
width: 0 |
||||||
|
height: 0 |
||||||
|
references: |
||||||
|
version: 2 |
||||||
|
RefIds: |
||||||
|
- rid: -2 |
||||||
|
type: {class: , ns: , asm: } |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 0ecaf7effd4cb5545b03d4f552942c80 |
||||||
|
NativeFormatImporter: |
||||||
|
externalObjects: {} |
||||||
|
mainObjectFileID: 11400000 |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,22 @@ |
|||||||
|
using TNode.Editor; |
||||||
|
using UnityEditor; |
||||||
|
using UnityEditor.Callbacks; |
||||||
|
using UnityEngine; |
||||||
|
|
||||||
|
namespace Sample.Editor{ |
||||||
|
public class HelloEditor : GraphEditor<HelloGraph>{ |
||||||
|
[OnOpenAsset] |
||||||
|
public static bool OnOpenAsset(int instanceID, int line){ |
||||||
|
var graph = EditorUtility.InstanceIDToObject(instanceID) as HelloGraph; |
||||||
|
if (graph != null) |
||||||
|
{ |
||||||
|
var wnd = GetWindow<HelloEditor>(); |
||||||
|
wnd.titleContent = new GUIContent("HelloGraph Editor"); |
||||||
|
wnd.CreateGUI(); |
||||||
|
wnd._graphView.Data = graph; |
||||||
|
return true; |
||||||
|
} |
||||||
|
return false; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,14 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: a5c15a07ff247a247a73d6991b540e27 |
||||||
|
MonoImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: |
||||||
|
- m_ViewDataDictionary: {instanceID: 0} |
||||||
|
- mVisualTreeAsset: {fileID: 9197481963319205126, guid: b67f6dcbe2361b649ad2b7845207321b, type: 3} |
||||||
|
- nodeEditorData: {fileID: 11400000, guid: 0ecaf7effd4cb5545b03d4f552942c80, type: 2} |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,11 @@ |
|||||||
|
using System; |
||||||
|
using TNode.Models; |
||||||
|
using UnityEngine; |
||||||
|
|
||||||
|
namespace Sample.Editor{ |
||||||
|
[CreateAssetMenu(fileName = "New HelloGraph", menuName = "TNode/HelloGraph")] |
||||||
|
[Serializable] |
||||||
|
public class HelloGraph : GraphData{ |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 9eda9b79596ecc746bb59fa8939c6ac3 |
||||||
|
MonoImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,9 @@ |
|||||||
|
using TNode.Attribute; |
||||||
|
using TNode.Editor.BaseViews; |
||||||
|
|
||||||
|
namespace Sample.Editor{ |
||||||
|
[NodeComponent] |
||||||
|
public class HelloGraphView : DataGraphView<HelloGraph>{ |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 8ec139b86ff8c10488c233a10e6106f4 |
||||||
|
MonoImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,23 @@ |
|||||||
|
%YAML 1.1 |
||||||
|
%TAG !u! tag:unity3d.com,2011: |
||||||
|
--- !u!114 &11400000 |
||||||
|
MonoBehaviour: |
||||||
|
m_ObjectHideFlags: 0 |
||||||
|
m_CorrespondingSourceObject: {fileID: 0} |
||||||
|
m_PrefabInstance: {fileID: 0} |
||||||
|
m_PrefabAsset: {fileID: 0} |
||||||
|
m_GameObject: {fileID: 0} |
||||||
|
m_Enabled: 1 |
||||||
|
m_EditorHideFlags: 0 |
||||||
|
m_Script: {fileID: 11500000, guid: 9eda9b79596ecc746bb59fa8939c6ac3, type: 3} |
||||||
|
m_Name: New HelloGraph |
||||||
|
m_EditorClassIdentifier: |
||||||
|
nodes: [] |
||||||
|
nodeLinks: [] |
||||||
|
entryNode: |
||||||
|
rid: -2 |
||||||
|
references: |
||||||
|
version: 2 |
||||||
|
RefIds: |
||||||
|
- rid: -2 |
||||||
|
type: {class: , ns: , asm: } |
@ -0,0 +1,8 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: edfa4bd023c6a7641aec2257a5e1248e |
||||||
|
NativeFormatImporter: |
||||||
|
externalObjects: {} |
||||||
|
mainObjectFileID: 11400000 |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
@ -0,0 +1,3 @@ |
|||||||
|
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False"> |
||||||
|
<ui:VisualElement name="InspectorBody" style="height: 458px; background-color: rgba(36, 36, 36, 255);" /> |
||||||
|
</ui:UXML> |
@ -0,0 +1,10 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 79c615f2df8f4cf45b71df7812d06674 |
||||||
|
ScriptedImporter: |
||||||
|
internalIDToNameTable: [] |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
||||||
|
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} |
Loading…
Reference in new issue