Class NetworkBehaviourEditor
The CustomEditor for NetworkBehaviour
Inherited Members
Editor.MoveNextTarget()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.Netcode.Editor
Assembly: Unity.Netcode.Editor.dll
Syntax
[CustomEditor(typeof(NetworkBehaviour), true)]
[CanEditMultipleObjects]
public class NetworkBehaviourEditor : Editor
Methods
CheckForNetworkObject(GameObject, bool)
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 |
bool | 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()
Implement this function to make a custom inspector.
Declaration
public override void OnInspectorGUI()