VariantsUtilsApplyVariantOnAttachNodes Method |
Applies variant settinsg to the part attach nodes.
Namespace:
KSPDev.PartUtils
Assembly:
KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
Syntaxpublic static void ApplyVariantOnAttachNodes(
Part part,
PartVariant variant,
bool updatePartPosition = false
)
Request Example
View SourceParameters
- part
- Type: (Default Namespace)Part
The part to apply the chnages to. - variant
- Type: (Default Namespace)PartVariant
The variant to apply. - updatePartPosition (Optional)
- Type: SystemBoolean
Tells if any connected parts at the attach nodes need to be repositioned accordingly. This may
trigger collisions in the scene, so use carefully.
Remarks
The stock apply variant method only does it when the active scene is editor. So if there is a
part in the flight scene with a variant, it needs to be updated for the proper KIS behavior.
See Also