Unity-Technologies / com.unity.webrtc

WebRTC package for Unity
Other
739 stars 185 forks source link

Add reserving eventID range and vulkan configuration for custom plugin events #886

Closed BrianHarrisonUnity closed 1 year ago

BrianHarrisonUnity commented 1 year ago

Issue:

Graphics native plugins can reserve an event range to use when issuing their custom events. Reserving a range allows the plugin to configure their own events and is useful to ensure there is no overlap with other plugins. Currently, the WebRTC plugin isn't configuring it's own events, and is issuing an event with ID 0. This is an issue, as WebRTC should be configuring it's render event to ensure it's excuted outside the render pass, and since it's using a non-reserved ID, any other native graphics plugin could be using the same ID, and configuring it with the wrong settings.

Summary of changes:

This change adds reserving a range of events to use, configuring the events, pushing the eventID through the API, updating unit tests, and checking that events issued have the expected eventID for handling.

Testing: Ran unit tests to verify no new issues occur.