Skip to content

Conversation

@RikuTheFuffs
Copy link
Contributor

@RikuTheFuffs RikuTheFuffs commented May 28, 2024

Description

  • Updated Dedicated Game Server sample to Unity 6, and related packages to 1.1.0

Issue Number(s)

Contribution checklist

  • Tests have been added for the project and/or any internal package
  • Release notes have been added to the project changelog file
  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • JIRA ticket ID is in the PR title or at least one commit message
  • Include the ticket ID number within the body message of the PR to create a hyperlink

How to test

  1. Clone this branch
  2. Open multiplayer play mode
  3. Set the current editor role as client or server
  4. Enable 2 virtual players and set their role so that there are exactly 2 clients and 1 server (inlcuding the main editor)
  5. Enter play mode
  6. Check that no errors show up in the console

…er Play Mode and dedicated server packages to 1.1.0
@RikuTheFuffs RikuTheFuffs requested a review from a team as a code owner May 28, 2024 13:53
@unity-cla-assistant
Copy link

unity-cla-assistant commented May 28, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ RikuTheFuffs
❌ Paolo Abela


Paolo Abela seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@RikuTheFuffs RikuTheFuffs changed the base branch from main to develop May 28, 2024 13:54
@RikuTheFuffs
Copy link
Contributor Author

I think tests are failing because of a method that throws an error during the build:

NotSupportedException: Use GetMultiplayerRoleForBuildProfile instead.
Unity.Multiplayer.Editor.EditorMultiplayerRolesManager.SetMultiplayerRoleForBuildTarget (UnityEditor.Build.NamedBuildTarget namedBuildTarget, Unity.Multiplayer.MultiplayerRoleFlags mask) (at ./Library/PackageCache/com.unity.dedicated-server/MultiplayerRoles/Editor/EditorMultiplayerRolesManager.cs:163)
Unity.DedicatedGameServerSample.Editor.BuildProcessor.BuildServer (UnityEditor.BuildTarget target, System.String locationPathName, System.Boolean exitApplicationOnFailure) (at Assets/Scripts/Editor/BuildProcessor.cs:135)
Unity.DedicatedGameServerSample.Editor.BuildHelpers.BuildAllEnabledServers () (at Assets/Scripts/Editor/BuildHelpers.cs:138)
Unity.DedicatedGameServerSample.Editor.BuildHelpers.BuildEnabledServersAndClients () (at Assets/Scripts/Editor/BuildHelpers.cs:113)

We'll probably have to replace SetMultiplayerRoleForBuildTarget with SetMultiplayerRoleForBuildProfile and create new build profiles + some custom logic to retrieve them at build time.

@RikuTheFuffs
Copy link
Contributor Author

RikuTheFuffs commented May 29, 2024

I removed the deprecated code, and tried to build locally from the editor: It works as expected:

image

image

image

But I still see that the build jobs fail on Yamato, probably due to some Unity 6 Yamato shenanigans. I'll ask the Yamato team to see if this is a known issue and how to overcome it.

image

EDIT: asked here

@Elfi0Kuhndorf
Copy link
Contributor

I get the following errors for the two clients:

Assertion failed on expression: 'scriptedImporterClass == SCRIPTING_NULL || uniqueDomainId == MonoDomainGetUniqueId()' (this one already upon the extra editor windows getting opened, both virtual players, so possibly connected to MPPM)

Assertion failed on expression: '!(InstanceID_AsSInt32Ref(instanceID) & 1)' (this one I get when entering play mode)

@fernando-cortez
Copy link
Contributor

Forgot to mention in my review, but for the URP assets & UI Toolkit changes, we should verify with TAs.

@RikuTheFuffs
Copy link
Contributor Author

I get the following errors for the two clients:

@Elfi0Kuhndorf what is the stack trace? If these errors are not generated by the code of this project, we can ignore them. (that menasv they're generated by the engine or by packages)

@RikuTheFuffs
Copy link
Contributor Author

Forgot to mention in my review, but for the URP assets & UI Toolkit changes, we should verify with TAs.

They're automatic changes due to the upgrade to Unity 6 and the cosnequent re-serialization of assets, they weren't changed manually.

chore: removed unneeded input asset, set project-wide input actions file
@RikuTheFuffs RikuTheFuffs merged commit 6c0eecf into develop Jun 5, 2024
@RikuTheFuffs RikuTheFuffs deleted the dgs/unity-6-update branch June 5, 2024 09:42
RikuTheFuffs added a commit that referenced this pull request Aug 29, 2024
* Dgs/unity 6 update (#181)

* chore: updated Dedicated Game Server Sample to Unity 6, and Multiplayer Play Mode and dedicated server packages to 1.1.0

* chore: update Unity version in the CI for Dedicated Game Server

* chore: attempted to change editor version to see if DGS sample can build

* feat: updated logic in BuildProcessor so it doesn't use deprecated (and now unneeded) APIs

* chore: temporarily disabled running tests of other samples (will be re-enabled after DGS troubleshooting)

* chore: disabled core part of BuildEverything automation to see if Yamato still fails

* chore: bisecting CI failure

* chore: bisecting CI failure

* chore: bisecting CI failure

* chore: attempted to change build path to see if CI fails

* Revert "chore: attempted to change build path to see if CI fails"

This reverts commit 72f9139.

* chore: disabled burst compilation

* chore: re-enabled build code

* chore: disabled burst compiler programmatically before and after builds

* chore: disabled building clients

* chore: updated burst to latest version

* chore: re-enabled client builds

* chore: restored tests of other samples

* feat: added UIToolkit support ot input system configuration
chore: removed unneeded input asset, set project-wide input actions file

---------

Co-authored-by: Paolo Abela <[email protected]>

* chore: (Dedicated game server) updated version badge in README

* Deprecation of "Invaders" sample (#186)

* chore: removed Invaders from CI, as it is now a deprecated sample

* chore: Moved "Invaders" sample to "Deprecated" folder

* chore: Added README for deprecated samples

* chore: Removed "Contributing" section from Deprecated samples README.md

* Feat: Multiplayer Use Cases UI toolkit implementation [MTT-7497] (#184)

* Added: integration of UIToolkit for NetworkManagerUI

* moving UI Toolkit related files into UI toolkit folder, also NetworkManagerUI.cs adjustments to integrate UI toolkit

* fix: added validation of IP and port address

* fix: color changes through button interactions work now

* fix: added Styleclasses instead of color fields to implement color changes of buttons

* fix: scaling of UI changes depending on screen size

* mtt-8638-Separate-PR-Triggers-per-project (#195)

* copy all changes to new branch

* changing name of shared triggers

* feat: Distributed Authority Sample initial project setup with scene & folder structure [MTT-8913] (#198)

* initial project commit

* Added: proposed folder structure from TDD

* consolidating settings folders

* adding ignored temp script for testing connection

---------

Co-authored-by: Elfi Kühndorf <[email protected]>

* feat: DistributedAuthoritySample Netcode for GameObjects & Multiplayer SDK package upgrade, scripting fix, editor upgrade (#203)

NGO & Multiplayer SDK package upgrade, scripting fix, editor upgrade

* feat: DedicatedGameServer sample upgraded to Netcode for GameObjects v1.8.1 API [MTT-8502] (#182)

DedicatedGameServer updated to NGO v1.8.1 API

* feat: Distributed Authority Sample player locomotion [MTT-8898] (#200)

* initial project commit

* Added: proposed folder structure from TDD

* consolidating settings folders

* adding ignored temp script for testing connection

* importing asteroids base classes & locomotion controller wip

* reworked drag, inheriting from baseobject movement

* cleanup, avatar set with AvatarTransform

* distinguishing spawmed players with name in hierarchy

* moving AvatarTransformEditor to own Editor subdirectory class, cleanup

* formatting changes

---------

Co-authored-by: Elfi Kühndorf <[email protected]>

* chore: updated README to provide a clear path to the onboarding resources in case a user closed the Tutorial window [skip ci]

* feat: distributed authority sample - adding assembly definitions [MTT-8945] (#207)

* asmdefs generated with dependencies mapped

* one unnecessary dependency removed

* renaming asmdefs & adding input assemblyinfo

* adding explicitly inputsystem to player assembly

* Usecases design feedback for out-of-experimental release (MTT-7498) (#209)

* chore: updated link in tutorials so it points at more recent RPCs

* chor: made font bigger in NetvarVsRPC scene, and rmeoved unneeded prefabs property overrides

* chore: added reminder text in completion dialogues to redirect to tutorials

* [MTT-8878] [MTT-8909] Feat: Distributed Authority sample Blockout + VFX (#206)


* consolidating settings folders

* feat: completed first draft of blockout

* LODs, 3 VFX, Lighting and post-processing

* Updated LODs to be single contained FBXs, removed VFX from scene, rebaked lighting

* Fix shader warnings

* Fixed statue mesh warnings, removed statue LODs, fixed Toon_Shaking shader warnings

* delete unneeded assets

* Overriding prefabs in order to be able to remove ProBuilder,  remove ClickToPlace script

* Changed: moved extracted ProMeshBuilder meshes into different folders and deleted extra folder, imported adjusted toonshaders, deleted smoke shadergraph and adjusted effected materials to use fire shadergraph and changed settings

---------

Co-authored-by: Fernando Cortez <[email protected]>
Co-authored-by: Vlad Neykov <[email protected]>

* feat: Distributed Authority Sample Avatar interactions (pick up & throw) [MTT-8905] [MTT-8884] (#208)

* asmdefs generated with dependencies mapped

* one unnecessary dependency removed

* renaming asmdefs & adding input assemblyinfo

* avatar-side pickup/toss of pickupable object

* adding a pickupable object, EnvironmentTransform, to scene with a spawner

* adding explicitly inputsystem to player assembly

* [MTT-8908] Feat: Adding PigChef character and necessary animations (#205)

* import PigChef plus dependencies, deleted scripts, WIP cleanup PigChef prefab

* removed unnecessary assets, adjusted AnimatorController for PigChef, added basic ThirdPersonController and Rigidbody

* feat: adjusted Animator settings (adding parameters and states), creating arm rigs setup and carryable object template

* added: pickup animation

* adding source animation files

pickup and throw animation source Maya files

* Updated pickup animation

Includes the new bone PickupLocation as child of the Hips bone with animation for being picked up

* animation update

keyframes updated

* Added: set up pickup functionality with fixedjoint, added PickUpItem tag and pickup locations on PigChef and CarryableObjectTemplate

also added move VS running

* added ThirdPersonRBController script

* Updates to prop carrying

Animation adjustments for carrying. Prefab adjustments for prop alignment

* removed: cloudproject link

* added throw animation

Includes Maya source files and FBX for Unity

* walk and run animation updates

Added keyframes for PickupLocation

* animation  update

Idle animation has a better pose for carrying the object

* feat: Added carry, drop and throw functionality, adjusted idle animation and added Rig animation functionality for Carrying

* adjusting rotations and positions of pottery hand locations

* animation updates

idle pose updates

* fixed animator bug with throw not playing and polished walk and run animations

clips and animator controller updated

* adjusted colliders from items, angle of pickup and pickup collider

* animation updates for carrying and throwing, AnimatorController state machine changes

Added anticipation to the throw. Now an Animation Event needs to be added so it throws at the correct time. Also fixed facial animation keyframes. Duplicate "_Rig" versions of the carry and throw clips are made in order to keyframe the IK rig.

* pottery prefab update

removed vertical offset

* created AnimationEvent for ThrowAction

* chest prefab updates

fine tuned hand attachment points

* added PickupLocation to PigChef prefab, adjusted throw logic to enable split throw animation

* Animation clip updates and Animator Controller updates for throwing on upper body only

Adjusted idle clip pose to remove pop when transitioning to walk/run. Split throw animation into two parts and removed lower body channels from the clips. Updated Animator Controller to play throw anticipation immediately when the button is pressed and throw release clip is played when the button is released.

* face animation fixes

keyframed eyes and mouth closed in all clips

* animation polish

adjusted idle pose to more closely match the walk pose

* deleting unnecessary transition in controller, slight controller script adjustments

* fixing throw force proportional to heldTime

* animation polish

Removed pop in blending when dropping a carried object.

* fix: cleaned up script and added dead zone to remove unwanted auto rotation

* removed unneeded extra idle layer

* fixed transition conditions

Transition from jump landing to walk and idle now have the conditions based on the Move parameter

* added groundLayer

* removed debugs and adjusted dead zone value

* animator controller updates

Removed has exit time from jump landing conditions

* fixed the problem where jump detached the hands from the carry object

All animation states need "write defaults" true. Jump was false, and that was the cause of the problem.

* deleting unused assets and changing asset location of CarryableObject script

* set Input in Player settings to both input systems

so that temp controller used in CharacterTest scene we have in this branch works

* reset PlayModeOptions and TimeManager to default, removed .vsconfig

* Removed: unneeded cane and chick related assets

Changed: Renaming of animation files for consistency and cleanup of animation folder

* Added: created Testing scene folder and moved CharacterTest over

* Test: creation a new controller to fix errors

* Changed: delete old controller, fixed + changed name of new animation controller

getting rid of broken text PPtr files

* moved ThirdPersonRBController into temp folder and removed audio files

* reset time and project settings

* Fixed: inconsistent naming

* fixed object name (have to take name from original asset which cannot be changed)

---------

Co-authored-by: davehunt-unity <[email protected]>

* chore: moved "MultiplayerUseCases" sample to the "basic" folder, and updated path in CI scripts

* chore: updated changelogs with 1.7.0 release notes
chore: updated README accoridng to the changes to Multiplayer Use Cases and Invaders

---------

Co-authored-by: Paolo Abela <[email protected]>
Co-authored-by: Elfi0Kuhndorf <[email protected]>
Co-authored-by: harshala-rajesh <[email protected]>
Co-authored-by: Fernando Cortez <[email protected]>
Co-authored-by: Elfi Kühndorf <[email protected]>
Co-authored-by: Vlad Neykov <[email protected]>
Co-authored-by: davehunt-unity <[email protected]>
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.

5 participants