Class GhostPresentationGameObjectAuthoring
Add the component to a ghost prefab to configure the presentation gameobject for the ghost.
Inherited Members
Namespace: Unity.NetCode.Hybrid
Syntax
[DisallowMultipleComponent]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.netcode@latest/index.html?subfolder=/api/Unity.NetCode.Hybrid.GhostPresentationGameObjectAuthoring.html")]
public class GhostPresentationGameObjectAuthoring : MonoBehaviour, IRegisterPlayableData
Remarks
If ServerPrefab or ClientPrefab are not null, the baking create a new additional entity with GhostPresentationGameObjectPrefab managed component that contains the prefab references. It also add to the converted entity an GhostPresentationGameObjectPrefabReference that references the new created entity. It finally register itself has a producer of IRegisterPlayableData.
Fields
ClientPrefab
The GameObject prefab which should be used as a visual representation of an entity on the client. GhostPresentationGameObjectPrefab for further information.
Declaration
public GameObject ClientPrefab
Field Value
Type | Description |
---|---|
GameObject |
ServerPrefab
The GameObject prefab which should be used as a visual representation of an entity on the server. GhostPresentationGameObjectPrefab for further information.
Declaration
public GameObject ServerPrefab
Field Value
Type | Description |
---|---|
GameObject |
Methods
RegisterPlayableData<T>()
Implementation of IRegisterPlayableData. Should not be called directly. It is invoked as part of the GhostAnimationController initialization.
Declaration
public void RegisterPlayableData<T>()
where T : struct, IComponentData
Type Parameters
Name | Description |
---|---|
T |