Click or drag to resize

IHasGUIOnGUI Method

A callback which is called for every GUI event.

Namespace:  KSPDev.GUIUtils
Assembly:  KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
Syntax
C#
void OnGUI()
Request Example View Source
Remarks

On the every frame update Unity sends at least two events to every handler: Layout and Repaint. There can be more input events sent. The implementation must not change the number of controls in the view after the layout event.

The modules don't need to implement this intefrace to be notified. It's called by the Unity core via messanging. However, implementing the interface make the inheritance and the overall code maintainability better.

See Also