Good day! I have a custom editor window that is exhibiting a strange issue with it’s color.
Basically, all of the windows, buttons, and fields appear lighter than they should.
You’ll notice in the picture below how the regular inspector looks in Dark Theme. The window to the left is my custom one; it’s somewhat atypical in that I am using PreviewRenderUtility to cover the entire window with a “scene like” view, then the GUI controls are drawn over the preview. All buttons, fields, and most other elements are not using custom GUIStyle’s, so they should appear exactly like the default inspector. The GUI control windows are using an image that I had to make significantly darker than it “should” have needed to be, in order to get the color to match the default inspector color.
Anyone have any ideas on what could be going on? The preview is drawn with these two lines of code (the lines aren’t one after the other like they are here):
preview.BeginPreview(pos, GUIStyle.none);
preview.Render(true, false);
I created a test editor window and it did not exhibit the issue, so I am inclined to believe the issue is why my use of PreviewRenderUtility.
You can most easily see the issue on the two buttons under “View Controls” which on the right side of my custom editor window. To the right of those buttons you can see what the buttons should look like by looking at the “Edit Repository” button in the inspector.