Skip to content

OnGainedOwnership and OnLostOwnership callback functions should be used more generically. #1002

Closed
@junyeop

Description

@junyeop

Is your feature request related to a problem? Please describe.

The ownership callback function is only called when calling the ChangeOwnership and RemoveOwnership functions.

However, the ownership callback function should be called in every case an object gains or loses ownership.

For example, when creating an object with the SpawnWithOwnership function, the ownership callback function is not called.

So you need to write a separate code to check the IsOwner status in the NetworkStart function.

Also, is there any reason the OnGainedOwnership and OnLostOwnership callback functions are only called on the client?

I think it could be used more generally if you call it from both server and client.

Describe the solution you'd like
OnGainedOwnership and OnLostOwnership callback functions should be used more generically. Ex. SpawnWithOwnership

Describe alternatives you've considered
The ownership callback function should be called in every case an object gains or loses ownership.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature, request or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions