Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Scripts/Editor/AdvancedGenericMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private AdvancedGenericMenuItem FindOrCreateItem( string name, AdvancedGenericMe
}
else
{
item = currentRoot.children.OfType<AdvancedGenericMenuItem>().FirstOrDefault( x => x.name == paths[0] );
item = currentRoot.childList.OfType<AdvancedGenericMenuItem>().FirstOrDefault( x => x.name == paths[0] );
if ( item == null )
currentRoot.AddChild( item = new AdvancedGenericMenuItem( paths[0] ) );
}
Expand Down
8 changes: 4 additions & 4 deletions Scripts/Editor/NodeEditorUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static bool IsCastableTo(this Type from, Type to) {
}

/// <summary>
/// Looking for ports with value Type compatible with a given type.
/// Looking for ports with value Type compatible with a given type.
/// </summary>
/// <param name="nodeType">Node to search</param>
/// <param name="compatibleType">Type to find compatiblities</param>
Expand Down Expand Up @@ -265,7 +265,7 @@ private static void CreateGraph() {

public static void CreateFromTemplate(string initialName, string templatePath) {
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(
0,
EntityId.None,
ScriptableObject.CreateInstance<DoCreateCodeFile>(),
initialName,
scriptIcon,
Expand All @@ -274,8 +274,8 @@ public static void CreateFromTemplate(string initialName, string templatePath) {
}

/// Inherits from EndNameAction, must override EndNameAction.Action
public class DoCreateCodeFile : UnityEditor.ProjectWindowCallback.EndNameEditAction {
public override void Action(int instanceId, string pathName, string resourceFile) {
public class DoCreateCodeFile : UnityEditor.ProjectWindowCallback.AssetCreationEndAction {
public override void Action(EntityId entityId, string pathName, string resourceFile) {
Object o = CreateScript(pathName, resourceFile);
ProjectWindowUtil.ShowCreatedAsset(o);
}
Expand Down
8 changes: 4 additions & 4 deletions Scripts/Editor/NodeEditorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ void OnFocus() {
graphEditor.OnWindowFocus();
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
}

dragThreshold = Math.Max(1f, Screen.width / 1000f);
}

void OnLostFocus() {
if (graphEditor != null) graphEditor.OnWindowFocusLost();
}
Expand Down Expand Up @@ -186,8 +186,8 @@ public void DeselectNode(XNode.Node node) {
}

[OnOpenAsset(0)]
public static bool OnOpen(int instanceID, int line) {
XNode.NodeGraph nodeGraph = EditorUtility.InstanceIDToObject(instanceID) as XNode.NodeGraph;
public static bool OnOpen(EntityId id, int line) {
XNode.NodeGraph nodeGraph = EditorUtility.EntityIdToObject(id) as XNode.NodeGraph;
if (nodeGraph != null) {
Open(nodeGraph);
return true;
Expand Down