public override void Action(int instanceId, string pathName, string resourceFile) { string uniquePath = AssetDatabase.GenerateUniqueAssetPath(pathName); string shaderName = Path.GetFileName(uniquePath); if (IOUtils.AllOpenedWindows.Count > 0) { EditorWindow openedWindow = AmplifyShaderEditorWindow.GetWindow <AmplifyShaderEditorWindow>(); AmplifyShaderEditorWindow currentWindow = AmplifyShaderEditorWindow.CreateTab(); WindowHelper.AddTab(openedWindow, currentWindow); UIUtils.CurrentWindow = currentWindow; } else { AmplifyShaderEditorWindow currentWindow = AmplifyShaderEditorWindow.OpenWindow(shaderName, UIUtils.ShaderIcon); UIUtils.CurrentWindow = currentWindow; } Shader shader = UIUtils.CreateNewEmpty(uniquePath, shaderName); ProjectWindowUtil.ShowCreatedAsset(shader); }