public override void OnInspectorGUI() { //base.OnInspectorGUI(); if (GUILayout.Button("Open Editor")) { GameDataObjectEditorWindow.OpenWindow((SO_Test)target); } }
public static bool OpenAsset(int instanceID, int line) { //try casting to correct type SO_Test obj = EditorUtility.InstanceIDToObject(instanceID) as SO_Test; if (obj != null) { GameDataObjectEditorWindow.OpenWindow(obj); //Notify Unity that we are handling the opening of this asset by returning true return(true); } //if we return false from this callback, Unity will handle opening the asset another way return(false); }