Skip to content

chore: UTP Transport 2.0 support [MTT-4473]#2162

Merged
jeffreyrainy merged 19 commits intodevelopfrom
chore/utp-2.0-support
Aug 31, 2022
Merged

chore: UTP Transport 2.0 support [MTT-4473]#2162
jeffreyrainy merged 19 commits intodevelopfrom
chore/utp-2.0-support

Conversation

@jeffreyrainy
Copy link
Copy Markdown
Contributor

@jeffreyrainy jeffreyrainy commented Aug 29, 2022

This adds conditional compilation checks and adjustments to support both UTP and UTP 2.0

MTT-4473

@jeffreyrainy jeffreyrainy changed the title chore: adding preprocessor define in Netcode for GameObjects, when UTP Transport is 2.0 or above chore: UTP Transport 2.0 support Aug 29, 2022
@jeffreyrainy jeffreyrainy marked this pull request as ready for review August 29, 2022 20:53
@jeffreyrainy jeffreyrainy requested review from a team and 0xFA11 as code owners August 29, 2022 20:53
Comment thread com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs Outdated
@simon-lemay-unity
Copy link
Copy Markdown
Contributor

I would test with the tools package installed. It triggers some code to be compiled which also needs to be updated for UTP 2.0. Off the top of my head:

  • The NetworkPipelineStageCollection.GetStageId will have to be updated in ExtractNetworkMetricsFromPipeline.
  • In CreateDriver, the pipeline stage registration made with NetworkPipelineStageCollection.RegisterPipelineStage needs to be updated too. It was replaced with the RegisterPipelineStage on NetworkDriver. Confusingly, the old registration will have to remain before the NetworkDriver.Create call, but the new registration will have to occur after it (since it needs to be called on the instance).

Comment thread com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs Outdated
@jeffreyrainy
Copy link
Copy Markdown
Contributor Author

MTT-4473

@jeffreyrainy
Copy link
Copy Markdown
Contributor Author

I would test with the tools package installed.

@Rosme

@jeffreyrainy jeffreyrainy enabled auto-merge (squash) August 30, 2022 19:14
@ashwinimurt ashwinimurt changed the title chore: UTP Transport 2.0 support chore: UTP Transport 2.0 support [MTT-4473] Aug 30, 2022
@jeffreyrainy jeffreyrainy disabled auto-merge August 30, 2022 19:42
@jeffreyrainy jeffreyrainy requested a review from a team as a code owner August 30, 2022 20:30
@jeffreyrainy
Copy link
Copy Markdown
Contributor Author

I would test with the tools package installed.

Ok, I fixed that. The latest commits allow building and running with tools. One test had to be disabled, but @Rosme is aware and OK with that.

@jeffreyrainy jeffreyrainy requested a review from a team as a code owner August 31, 2022 02:11
@jeffreyrainy jeffreyrainy merged commit 86b7d99 into develop Aug 31, 2022
@jeffreyrainy jeffreyrainy deleted the chore/utp-2.0-support branch August 31, 2022 19:21
jakobbbb pushed a commit to GooseGirlGames/com.unity.netcode.gameobjects that referenced this pull request Feb 22, 2023
* chore: adding preprocessor define in Netcode for GameObjects, when UTP Transport is 2.0 or above

* chore: adding preprocessor define in Netcode for GameObjects, when UTP Transport is 2.0 or above

* chore: adding preprocessor define in Netcode for GameObjects tests, when UTP Transport is 2.0 or above

* chore: conditional use of UTP 2.0

* style: coding standards

* style: coding standards

* Adding some fixed from PR review comment

* fix: fixing tools package compilation, when used in netcode for gameobjects, with UTP 2.0

* fix: fixing tools package compilation, when used in netcode for gameobjects, with UTP 2.0

* fix: build break for UTP 2.0 builds without tools installed

* fix: fixing build errors with Collection 2.1.0-exp3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants