private void OnClickRenameNode(Vector2 mousePosition) { Rect rect = new Rect(GUIUtility.GUIToScreenPoint(mousePosition), new Vector2(200, 85)); SO_RenamePopUpWindow.OpenEditorWindow(AssetToUpdate, rect); InContexMenu = false; }
public static void OpenEditorWindow(SO_Node Asset, Rect pos) { SO_RenamePopUpWindow window = ScriptableObject.CreateInstance <SO_RenamePopUpWindow>(); Texture icon = AssetDatabase.LoadAssetAtPath <Texture>("Assets/AndreLibrary/Editor/BT_Icon.png"); GUIContent titleContent = new GUIContent("Rename " + Asset.name, icon); AssetToUpdate = Asset; window.titleContent = titleContent; window.position = pos; tex = AssetDatabase.LoadAssetAtPath <Texture>("Assets/AndreLibrary/Editor/BT_Lighter_Grey_Blue.jpg"); window.ShowModalUtility(); }