Still trying to wrap my head around server vs local calls

Im still not comfortable understanding when to call local vs network methods.

In this case for example, in the UnitProjectile script, we apply the velocity in Start (locally) and the destroy on the server. Why is the velocity done locally and not on the server?

1 Like

Remember the UnitProjectile is always instantiated on the server (in UnitFiring.Update() which is a [ServerCallback] ) so it’s ok to set the velocity in Start() as that will implicitly be done on the server.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms