public void Initialize(Part sourcePart, ConfigurableModule configurableModule) { if (sourcePart == null || configurableModule == null) { GameManager.Instance.Log.WriteException(new ArgumentException()); return; } _sourcePart = sourcePart; if (configurableModule != null) { _configurableModule = configurableModule; _icon.sprite = sourcePart.Sprite; _sourcePartName.text = sourcePart.Name; _effectText.text = _configurableModule.Name; bool partEnabled = _configurableModule.Enabled; _toggle.isOn = partEnabled; } }
private static void Main(string[] args) { var module = new ConfigurableModule(); module.StartModuleAsync(args).Wait(); }