Click or drag to resize

PartModelUpdateHighlighters Method (Transform, Transform)

Refreshes the highlighters on the part that owns the provided model.

Namespace:  KSPDev.PartUtils
Assembly:  KSPDev_Utils.2.5 (in KSPDev_Utils.2.5.dll) Version: 2.5 for KSP v1
Syntax
C#
public static void UpdateHighlighters(
	Transform modelObj,
	Transform exclude = null
)
Request Example View Source

Parameters

modelObj
Type: UnityEngineTransform
The game object which needs an update. It can be null.
exclude (Optional)
Type: UnityEngineTransform
If set, then this object and all its children will be excluded from highlighting.
Remarks
When a part is highlighted (e.g. due to the mouse hover event), it highlights its models via a pre-cached set of the highlighter components. This cache is constructed on the part creation. If a model is added or removed from the part in runtime, the cache needs to be updated. This method does it by finding the part from the game objects hierarchy. If there is a part found, then its highlighters are updated.
See Also