PredictedOwner

The PredictedOwner component allows a user to claim ownership of an object immediately and be able to use it before the server officially gives the ownership over.

Description

The PredictedOwner allows clients to immediately simulate ownership on an object without waiting for the server's response. This overcomes delays from client latency, allowing for a seamless transition of ownership. Placing this component on an object enables this feature for that network object.

A client can use the TakeOwnership method to anticipatorily claim ownership of an object. You can also access the PreviousOwner of the object and by inheriting from this component you can add checks to the server to decide whether to accept the ownership change or reject it. This can be done by overriding the OnTakeOwnership method and not handing over the ownership for whatever reason you may have.

Settings

Default Settings

⚙️ Allow Take Ownership

This enables or disables the functionality of this component, and can be set at run-time from the server with this method: SetAllowTakeOwnership.

Last updated