using System;using System.Diagnostics;using UnityEditor;using UnityEditor.Callbacks;using UnityEngine;publicclassAssetOpenModeWindow:EditorWindow{privatestaticCodeOpneMode shaderOpenMode= CodeOpneMode.VSCode;privatestaticCodeOpneMode csOpenMode= CodeOpneMode.Default;privateAssetOpenModeWindow window;privatefloat currentWidth;privatefloat currentHeight;privatevoidOnEnable(){Load();}privatevoidOnGUI(){ GUI.backgroundColor=newColor32(0,170,255,50); EditorGUILayout.BeginVertical("box"); GUI.backgroundColor=newColor32(255,255,0,180); shaderOpenMode=(CodeOpneMode)EditorGUILayout.EnumPopup("Shader", shaderOpenMode); csOpenMode=(CodeOpneMode)EditorGUILayout.EnumPopup("CS", csOpenMode); EditorGUILayout.EndVertical();}privatevoidOnDestroy(){Save();}[MenuItem("XDEDZL/Asset/OpenMode")]privatestaticvoidOpenWidown(){GetWindow(typeof(AssetOpenModeWindow));}[OnOpenAsset(1)]publicstaticboolOpenAsset(int instanceID,int line){string fileFullPath= System.IO.Directory.GetParent(Application.dataPath)+"/"+ A