Class GhostAuthoringComponent
The GhostAuthoringComponent is the main entry point to configure and create replicated ghosts types in baked subscenes. The component must be added only to the GameObject hierarchy root. For runtime GameObject replication, please use GhostAdapter
It allows setting all ghost properties, such as the replication mode SupportedGhostModes, bandwidth optimization strategy (OptimizationMode, the ghost Importance (how frequently is sent) and others).
Inheritance
GhostAuthoringComponent
Inherited Members
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, InstantiateParameters)
Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
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
Assembly: Unity.NetCode.Authoring.Hybrid.dll
Syntax
[RequireComponent(typeof(LinkedEntityGroupAuthoring))]
[DisallowMultipleComponent]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.netcode@latest/index.html?subfolder=/api/Unity.NetCode.GhostAuthoringComponent.html")]
public class GhostAuthoringComponent : BaseGhostSettings
Properties
SupportsSendTypeOptimization
True if we can apply the GhostSendType optimization on this Ghost.
Declaration
public bool SupportsSendTypeOptimization { get; }
Property Value
| Type | Description |
|---|---|
| bool |
See Also
Methods
GetAndValidateGhostName(out ulong)
Validate the name of the GameObject prefab.
Declaration
public FixedString64Bytes GetAndValidateGhostName(out ulong ghostNameHash)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | ghostNameHash | Outputs the hash generated from the name. |
Returns
| Type | Description |
|---|---|
| FixedString64Bytes | The FS equivalent of the gameObject.name. |