Class NetworkBehaviourEditor
The CustomEditor for NetworkBehaviour
Inherited Members
Namespace: Unity.Netcode.Editor
Syntax
[CustomEditor(typeof(NetworkBehaviour), true)]
[CanEditMultipleObjects]
public class NetworkBehaviourEditor : Editor, IPreviewable, IToolModeOwner
Methods
CheckForNetworkObject(GameObject, Boolean)
Used to determine if a GameObject has one or more NetworkBehaviours but does not already have a NetworkObject component. If not it will notify the user that NetworkBehaviours require a NetworkObject.
Declaration
public static void CheckForNetworkObject(GameObject gameObject, bool networkObjectRemoved = false)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | GameObject to start checking for a NetworkObject |
Boolean | networkObjectRemoved | used internally |
GetRootParentTransform(Transform)
Recursively finds the root parent of a Transform
Declaration
public static Transform GetRootParentTransform(Transform transform)
Parameters
Type | Name | Description |
---|---|---|
Transform | transform | The current Transform we are inspecting for a parent |
Returns
Type | Description |
---|---|
Transform | the root parent for the first Transform passed into the method |
OnInspectorGUI()
Declaration
public override void OnInspectorGUI()