Class NetcodeEditorBase<TT>
The base Netcode Editor helper class to display derived MonoBehaviour based components
where each child generation's properties will be displayed within a FoldoutHeaderGroup.
Inherited Members
Namespace: Unity.Netcode.Editor
Assembly: Unity.Netcode.Editor.dll
Syntax
[CanEditMultipleObjects]
public class NetcodeEditorBase<TT> : Editor where TT : MonoBehaviour
Type Parameters
Name | Description |
---|---|
TT | The base MonoBehaviour derived component type |
Remarks
TT Defines the base MonoBehaviour derived component type where DrawFoldOutGroup<T>(Type, Action, bool, Action<bool>)'s type T refers to any child derived class of TT. This provides the ability to have multiple child generation derived custom editos that each child derivation handles drawing its unique properies from that of its parent class.
Methods
DrawFoldOutGroup<T>(Type, Action, bool, Action<bool>)
Helper method to draw the properties of the specified child type T
component within a FoldoutHeaderGroup.
Declaration
protected void DrawFoldOutGroup<T>(Type type, Action displayProperties, bool expanded, Action<bool> setExpandedProperty)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The component type of the target. |
Action | displayProperties | The Action to invoke that will draw the type |
bool | expanded | The |
Action<bool> | setExpandedProperty | The Action<T> invoked to apply the updated |
Type Parameters
Name | Description |
---|---|
T | The specific child derived type of TT or the type of TT that should have its properties drawn. |
Remarks
T must be a sub-class of the root parent class type TT.
OnEnable()
Declaration
public virtual void OnEnable()
OnInspectorGUI()
Implement this function to make a custom inspector.
Declaration
public override void OnInspectorGUI()