Skip to main content

Class BaseBatterySystemEditor

Base custom editor for battery system components which provides a shared inspector layout.

public abstract class BaseBatterySystemEditor : Editor

Inheritance​

Derived​

Properties​

Bar_HighValue​

The progress bar's max value.

protected abstract float Bar_HighValue { get; }

Property Value​

float

Bar_Label​

Label displayed in the progress bar.

protected abstract string Bar_Label { get; }

Property Value​

string

Bar_Value​

Current value to display in the progress bar.

protected abstract float Bar_Value { get; }

Property Value​

float

MainColor​

Color used for the progress bar and debug box borders.

protected abstract Color MainColor { get; }

Property Value​

Color

Methods​

CreateInspectorGUI()​

Implement this method to make a custom UIElements inspector.

public override VisualElement CreateInspectorGUI()

Returns​

VisualElement

OnDrainInvoked(float)​

Callback function when the drain button is clicked.

protected abstract void OnDrainInvoked(float drainAmount)

Parameters​

NameTypeDescription
drainAmountfloatAmount to drain from system.
  • Properties
    • Bar_HighValue
    • Bar_Label
    • Bar_Value
    • MainColor
  • Methods
    • CreateInspectorGUI()
    • OnDrainInvoked(float)