Hello, i'm trying to learn about unity netcode but Ghost prefab confused me.
[GhostComponent(PrefabType = GhostPrefabType.AllPredicted)]
public partial struct KeyboardInput : IInputComponentData
{
public float2 MovementInput;
}
I'm using this component to sync my player's position, what i didn't understand is when i use this
[GhostComponent(PrefabType = GhostPrefabType.AllPredicted)]
public partial struct KeyboardInput : IComponentData
{
[GhostField]
public float2 MovementInput;
}
Server not sets the entity transform, why ?
The only way to set a entity's component data using IInputComponentData or ICommandData from client side ?