How do i create one shot events that happen with an entity using netcode for entities?
For example a damage number or combat cue
How do i create one shot events that happen with an entity using netcode for entities?
For example a damage number or combat cue
You could use RPCs to solve this.
https://docs.unity3d.com/Packages/com.unity.netcode@1.4/manual/rpcs.html
You can also look at our HelloNetcode samples that have various samples that builds up towards a first person shooter. Here we implement shooting and health supported by prediction: EntityComponentSystemSamples/NetcodeSamples/Assets/Samples/HelloNetcode at master ¡ Unity-Technologies/EntityComponentSystemSamples ¡ GitHub
We also have other samples in there. For example Asteroids: EntityComponentSystemSamples/NetcodeSamples/Assets/Samples/Asteroids at master ¡ Unity-Technologies/EntityComponentSystemSamples ¡ GitHub
But i need Ghost Relevancy because they happen on specific location. Is there any way to integrate relevancy with rpc?
I am not sure what you mean.
But we have an example of shooting and using hit markers. Maybe that can help you figure out what you need. It doesnât use RPCs nor Relevancy. But you can add relevancy to your âmarkerâ prefabs if you want.
Not today, unfortunately: âRPCsâ and âGhosts with Relevancyâ are not aware of each other (yet). For posterity (for others), follow updates here: Am I implementing network events in the correct way?