ParagonEntertainmentBanner
Displays a branded "Paragon Entertainment" banner centered in the Unity Editor's status bar. The banner is toggled via an editor preference and uses reflection-based OnGUI injection into Unity's internal AppStatusBar.
Definition
Namespace: Paragon.Editor Assembly: Paragon.Editor.dll
[InitializeOnLoad]
internal static class ParagonEntertainmentBannerAttributes: [InitializeOnLoad] — initializes via static constructor on editor load.
Remarks
This class hooks into Unity's internal AppStatusBar window to draw a gold-colored "Paragon Entertainment" label. It uses OnGUIInjector from the LowLevel subsystem to inject a custom OnGUI callback into the status bar's draw loop.
Initialization Flow
Static constructor runs on editor load (
[InitializeOnLoad])Reflection finds
UnityEditor.AppStatusBartype and itsRepaintmethodEditorApplication.delayCallschedulesOnEditorUpdate(status bar may not exist yet)OnEditorUpdatefinds the status bar instance viaResources.FindObjectsOfTypeAllOnGUIInjector.Injecthooks theOnGUIcallback into the status bar
Toggle Mechanism
The Enabled property is backed by the [EditorPreference] attribute (from ParagonSettings), persisting the toggle across editor sessions. Setting Enabled triggers a repaint of the status bar.
Quick Lookup
Toggle banner
Set ParagonEntertainmentBanner.Enabled (via Editor Preferences)
Banner text
" ~ Paragon Entertainment ~ "
Banner color
Gold — Color(1f, 0.843f, 0)
Banner width
180px fixed
Properties
Enabled
bool
public static
Toggles banner visibility; persisted via [EditorPreference]
Fields
statusBar
ScriptableObject
private static
Reference to Unity's internal AppStatusBar instance
appStatusBarType
Type
private static readonly
Reflected type of UnityEditor.AppStatusBar
appStatusBarRepaintMethod
MethodInfo
private static readonly
Reflected Repaint method on the status bar
enabled
bool
private static
Backing field for the Enabled property
Methods
OnEditorUpdate (private)
Finds the AppStatusBar instance and injects the OnGUI callback. Called once via EditorApplication.delayCall.
OnGUI (private)
Draws the banner label centered in the status bar area. Only draws if enabled is true.
Repaint (private)
Invokes AppStatusBar.Repaint() via reflection to refresh the status bar.
Common Pitfalls
Relies on Unity internals The class accesses UnityEditor.AppStatusBar via reflection. This is an internal Unity type that may change between Unity versions. If the type or method signature changes, the banner will fail silently.
Internal class — not extensible ParagonEntertainmentBanner is internal static and cannot be subclassed or accessed from outside the Paragon.Editor assembly.
See Also
ParagonMenuItems — other root editor utilities
Paragon Editor Overview — system overview
Last updated