public override void OnInspectorGUI() { if (GUILayout.Button("Open Device Model Config Editor")) { AlphaDeviceModelConfigEditorWindow.OpenWindow((/*Texture2D*/ DeviceModelConfig)target); } }
public static void OpenWindow(DeviceModelConfig deviceModelConfig) { if (deviceModelConfig == null) { return; } AlphaDeviceModelConfigEditorWindow window = GetWindow <AlphaDeviceModelConfigEditorWindow>(true, "Device Model Config Editor"); window.m_Config = deviceModelConfig; window.minSize = new Vector2(460f, 400f); }