Click or drag to resize

PartModuleUtilsAddEvent Method

Add an event into a part module.

Namespace:  KSPDev.PartUtils
Assembly:  KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
Syntax
C#
public static void AddEvent(
	PartModule module,
	BaseEvent partEvent
)
Request Example View Source

Parameters

module
Type: (Default Namespace)PartModule
The part module to add the event into.
partEvent
Type: (Default Namespace)BaseEvent
The event object.
Remarks

This method will not add the same event twice. So it's safe to call it multiple times for the same event object.

The name of the event may be used by the other modules to get the event. So keeping it unique may be needed to not break the behavior of the part.

See Also