private void TurnDisplayOff() { if (IsBeingDeleted) { return; } if (_jetStreamT242Display != null) { _jetStreamT242Display.TurnDisplayOff(); Destroy(_jetStreamT242Display); _jetStreamT242Display = null; } }
private void TurnDisplayOn() { try { if (IsBeingDeleted) { return; } if (_jetStreamT242Display != null) { Log.Info("Turnoff"); TurnDisplayOff(); } _jetStreamT242Display = gameObject.AddComponent <JetStreamT242Display>(); _jetStreamT242Display.Setup(this); } catch (Exception e) { Log.Error($"Error in TurnDisplayOn Method: {e.Message} || {e.InnerException} || {e.Source}"); } }