I have part with plugin and all part have force. I can change this force in gui and when i change force it only one part have new force. How make parts list and how control all parts? I can't find this on wiki. using UnityEngine; using PluginTutorial.Extensions; using KSP.IO; namespace PluginTutorial { public class PluginTutorial : PartModule { private static Rect _windowPosition = new Rect(); private GUIStyle _windowStyle, _labelStyle; private bool _hasInitStyles = false; public float force = 10f; public override void OnStart(PartModule.StartState state) { if (state != StartState.Editor) { if (!_hasInitStyles) InitStyles(); RenderingManager.AddToPostDrawQueue(0, OnDraw); } } public override void OnSave(ConfigNode node) { PluginConfiguration config = PluginConfiguration.CreateForType<PluginTutorial>(); config.SetValue("Window Position", _windowPosition); config.save(); } public override void OnLoad(ConfigNode node) { PluginConfiguration config = PluginConfiguration.CreateForType<PluginTutorial>(); config.load(); _windowPosition = config.GetValue<Rect>("Window Position"); } public override void OnUpdate() { if (this.vessel == FlightGlobals.ActiveVessel) { this.rigidbody.AddRelativeForce(Vector3.up * force * FlightInputHandler.state.mainThrottle); } } private void OnDraw() { if (this.vessel == FlightGlobals.ActiveVessel && this.part.IsPrimary(this.vessel.parts, this.ClassID)) { _windowPosition = GUILayout.Window(10, _windowPosition, OnWindow, "This is a title", _windowStyle); } } private void OnWindow(int windowId) { string sSila; sSila = force.ToString(); GUILayout.BeginHorizontal(); GUILayout.Label(sSila, _labelStyle); GUILayout.EndHorizontal(); if (GUI.Button(new Rect(25, 50, 30, 30), "+")) force += 10; if (GUI.Button(new Rect(75, 50, 30, 30), "-")) force -= 10; GUI.DragWindow(); } private void InitStyles() { _windowStyle = new GUIStyle(HighLogic.Skin.window); _windowStyle.fixedWidth=250f; _windowStyle.fixedHeight = 250f; _labelStyle = new GUIStyle(HighLogic.Skin.label); _labelStyle.stretchWidth = true; _hasInitStyles = true; } } }