Skip to content

New Approval Func<ConnectionApprovalRequest, ConnectionApprovalResponse> restricts approval to main thread #1992

@JayPeet

Description

@JayPeet

Feedback
The new changes to the NetworkManager.ConnectionApprovalCallback seems to restrict the usage of Approval to anything main thread related (since its waiting in the function to return the ConnectionApprovalResponse). The documentation gives an example of doing a Steam API ticket check on client connection, which would be a web request that could take seconds to complete.
In my current code, I do a web request to the authentication API to check if the client is authenticated, which now requires me to lock the main thread, whereas before I would just call the callback later once my web request had finished.

Suggested Changes
Not sure what to suggest as this change was intentionally made by the NGO team. However it seems like the Approval callback is now useless for doing any actual authentication / approval since it seems to block the main thread

Metadata

Metadata

Assignees

Labels

type:feedbackIssue contains feedback and not specific bug or feature requests.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions