fix: Connect to the next best realm if the Explore JumpIn fails (Unity side)#781
Conversation
|
After the CI passes:
|
| public void JumpInPressed() | ||
| { | ||
| HotScenesController.HotSceneInfo.Realm realm = new HotScenesController.HotSceneInfo.Realm() { layer = null, serverName = null }; | ||
| hotSceneInfo.realms = hotSceneInfo.realms.ToList().OrderByDescending(x => x.usersCount).ToArray(); |
There was a problem hiding this comment.
IMPORTANT: Until now, the Explore's JumpIn was working exactly the opposite of how it should! The hotSceneInfo.realms list was ordered so that the realms with the fewest users were at the top of the list, then we always were jumping to the worst option. Now I have sorted the list by number of users in a descending order and it already works as it should 👍
…jump-in-fails-unity-side
pravusjif
left a comment
There was a problem hiding this comment.
I couldn't test the realm error, I'm approving the PRs because it most probably works fine, although I believe optimizations could be done as mentioned in my comments: since Kernel already checks if we can enter a realm or not, we could just send the realms ordered list to Kernel and stop the renderer's responsibilities there.
…jump-in-fails-unity-side
…jump-in-fails-unity-side
…jump-in-fails-unity-side
…y side) (#781) * fix: Connect to the next best realm if the jump in fails (Unity Side) * Add 'tryOtherRealms' param into the JumpIn payload * Variables renaming * Apply refactor (I) * Add NotifyStatusThroughChat in the WebInterface
* test: merge avatar meshes * add new MeshCombiner draft * fixes * test * test with mesh renderer only * bones scaling fix * fix: bone mismatch issue due to trying to add a previously combined avatar as a wearable to the combine list - also renamed MeshCombiner to AvatarMeshCombiner - also, removed logs * fix: localBounds not correctly set on combined avatar, leading to animation culling not working as intended - also did a small optimization to the dummy skinned mesh renderer logic. * fix: copy the root layer when combining meshes to cope with the preview avatar * fix: material caching improvements - material names were breaking crc batches, all materials are now named "Material" - in MaterialCachingHelper, material optimization was made after calculating crc, this also fragmented batches when not needed. - moved material caching logic to ProcessSingleMaterial to be able to use it without the time budget logic. * single material test * add avatar name testing with H * add unlit test with 'J' * avatars texture array approach draft - only compatible with opaque + emissive wearables. pending implementation of transparencies. * remove debug key * test * texture selection branching approach draft * re-added array texture approach to test aggressive avatar draw call combining * switch optimization to branching approach * add profiling data * ShaderGraph Toon Shader branching approach implementation * fix: third person camera polish (#577) * fix: camera polish - reduce Z damping - disabled camera offset, now offset is set from each freelook rig - offset tweaks to make the center of the screen point to the front of the avatar - bottom rig tweaks to make the camera get near the avatar on low angles * upgrade cinemachine to 2.6.5 * fix: Y jittering on uneven terrain - now, on-air damping is different from ground and moving platforms damping * fix: camera not colliding with world elements on some cases - tested on genesis plaza main building surroundings * fix: falling behaviour - add special camera that only activates when falling from high altitude for a few time. This camera should be triggered mostly when falling from genesis plaza starting hole. * add a bit of camera blocking damping * world offset fix * fix: tweaks to player top rig - update cinemachine version to 2.7.4 * flaky tests hot-fixes * polish: bottom, mid, top camera rigs - mid rig is more centered - bottom is more bottom - top is more top, lateral framing more consistent with mid rig * polish: moving platforms and tps input damping - add very small mouse input damping for 3rd person camera only - moved FollowWithDamping to camera folder, used damping from cinemachine API directly - add special damping parameters for moving platforms - removed x and y damping on CharacterCameraTarget to avoid jittering on horizontal moving platforms * add sprint damping * tweaks * code cleanup - moved camera logic to classes to simplify and SRP - camera logic classes are toggleable, toggled them off on tests - moved all camera stuff to DCL.Camera namespace * removed dutch issue + removed axis damping * mouse sensitivity tweaks - for speed mode, used input gain value instead of max speed because is more accurate to our intention (we really don't want to cap the mouse speed, just multiply the mouse movement value) - re-calibrated cinemachine and sensitivity values to reflect this decision * change mouse sensitivity values for tps * add more inclination to top and bottom camera angles * add files and formatting * fix: flickering material (#743) * Temporarily remove SceneBoundsChecker time budget * HighPrio SceneBoundsChecker * Cleanup SceneBoundsChecker implementation * Tests * fix: gltf loading after entity is destroyed (#746) * fix: disable unused webgl data caching to fix firefox incognito mode infinity loading (#759) * chore: set "unprioritized" label to opened issues (#761) * refactor: scene boundarie checker (#664) * feat: adding error system for entities * feat: error marked as red * fix: removed twice calls * feat: fixed SceneBoundaries * clean: clean InitialScene.unity * fix: fix lighting of the initial scene * feat: add new texture to the error prefab * feat: add transparency to the cube * fix: redo implementantion of unit test * merge master into this branch * feat: add a clean method for the scene boundaries feedback * fix: all submeshes are included * feat: add unit test * fix: unit test * fix: unit test * chore: store test results in junit format (#778) * chore: transform the playmode results from NUnit format to JUnit format to make CircleCI understand the report * chore: upload code coverage report (#777) * chore: upload code coverage report * remove code coverage circle ci artifacts * filter `protocol`, `websocketsharp` and `unitygltfassembly` assemblies definitions from code coverage * fix: biw smart item compatibility (#756) * fix: get the correct url org or io * fix: include meta files * fix: biw smart item compatibility * feat: add compatibility with builder smart items * style: adds a note for the future * feat: biw save each 5 seconds (#788) * feat: change forcesave for try to save * style: remove debug logs * fix: biw screenshot take * fix: removing correct meshes (#796) * fix: code coverage outside NPM (#797) * fix: code coverage outside NPM * omg * feat: port loading into unity (#757) * Port loading into Unity * Implemented LoadingHUD following the new HUDController refactored * Polishing UI * Polishing UI * Polishing UI * Teleporting visuals in LoadingHUD * Some missing references * Removed unneded component * Increase canvas order of LoadingHUD * Increase canvas order of LoadingHUD * Messages anchoring * Change time between tips * Added new TeleportLoading prefab * Now DCL logo appears properly * Teleport Loading implemented * Now use scale instead of fill amount for progress bar * LoadingHUD Tests * Fix test * Fixes in TeleportLoading prefab and animation * Sprites and folder reorganized. Atlas created for loading sprites. * LoadingHUD polished. * Missing images and progress bar fixed. * Removed native size and added markteplace tip * Teleport sprites bad quality fixed. * Teleport assets pos Y adjusted. * Dont reset percentage when disabling (to behave as web) Co-authored-by: estefania colutta <estefania.colutta@etermax.com> Co-authored-by: Romina Marchetti <romi@decentraland.org> * feat: avatar lods (feature-flagged) (#677) Implemented first avatars LOD system for performance, feature flagged under the 'ENABLE_AVATAR_LODS' URL param * feat: streaming wasm (#688) * test: streaming wasm * make it work * test new artifacts uploader * add build validations to prevent accidental regressions * do not upload code coverage * remove code coverage * revert rimraf code-coverage * enableBrotli flag * fix brotli fallback * fix: gltf importer texture scale hiccup (#747) * fix: missing reference exception * fix: cpu-bound hiccup when resizing GLTF texture * chore: add new emotes (#784) * New emotes * Disco anim * fix: typing roots (#807) * fix typing roots * consistent naming * good, the test failed * style: increase font size in loading screen (#809) * fix: bug fixing * Revert "fix: gltf importer texture scale hiccup (#747)" This reverts commit 0876770 * fix: Connect to the next best realm if the Explore JumpIn fails (Unity side) (#781) * fix: Connect to the next best realm if the jump in fails (Unity Side) * Add 'tryOtherRealms' param into the JumpIn payload * Variables renaming * Apply refactor (I) * Add NotifyStatusThroughChat in the WebInterface * chore: visual test for materials (#434) * Visual Test for Materials * Fixed normal mapping in visual tests * New baseline images generated * Visual Test SSAO vs transparents * Remove debugging info * Emission + AlphaTexture + Albedo's Alpha visual tests * More visual tests * Renamed baseline * Now visual tests wait properly to textures to be ready * Trying to fix some issues with tests in CI * Tests without anisotropic filtering * Debug info * More debug info * More debugging info * Now baselines are taken properly with an invariant culture name. * Fix inputField * Properly fix the InputField issues * updated MatCap implementation to work with a single map * shader tweaks * split combine layers into opaque and transparent renderers * code cleanup * shader tweaks * code cleanup * fix: minor changes to botsController - DBZ skin colors are back - Removed some unneeded DCLCharacterController references - Marked CharacterPosition character controller's field as obsolete to avoid future uses * fix: old avatar primitives ended without parents * fix: backpack not working correctly with merged avatar meshes Also, reparented the combinedAvatar gameObject to the animator's gameObject and toggled it so the animator takes the combined mesh when evaluating the BasedOnRenderers culling type. * fix: ToonShaderCompiled lacked transparency support * fix: shader alpha input - fix: custom sampling function missed alpha component - refactor: moved custom sampling function to SampleTexture.hlsl * fix: cullMode wasn't factored into submesh slicing - fix: materials weren't correctly configured, same material was being overwritten several times ending up with whatever values were in the last material of the original meshes - refactor: add boneWeights calculation to its own method - fix: moved cutoff to z component of texturePointers to support varying levels of cutoff across the avatar. * slicing logic overhaul to support all cases * add _Cutoff by uv3 stream routing. Remove CutOff uniform. * chore: reorganized toon shader folders * add test placeholders * _AvatarName is now solved by ints instead of strings * update ToonShaderCompiled with the latest _CutOff removal and blend mode patches. * bug fixes * fix: single frame giant avatar issue - remove unneeded code from AvatarRenderer related to material cloning. - remove BodyShapeController dummy skinned renderer workaround as its not needed anymore * fix: SSAO was not working for the new toon shader * major refactor to remove boilerplate on AvatarRenderer - Moved merging avatars AvatarRenderer code to AvatarMeshCombinerHelper - AvatarMeshCombiner now just combines the meshes and returns a struct. GameObject management is reigned by the helper - The helper re-uses the same skinned mesh renderer each time to make the backpack equip transition without any kind of empty mesh stutter * more code cleanup * add code documentation * add test drafts * fix: many small issues - fix: original heads were reactivated by the facial culling after loading - fix: faces sometimes turned to pink of death color - fix: SetActiveParts code was not compatible with UpdateVisibility, this worked by pure luck * fix: -1 textureIndex path not being taken correctly in SampleTexture.hlsl * fix: face was showing up before the avatar finished loading * fix: small nullRef error when stopped playing on unity editor * fix: toon shader - many adjustments were made to make the toon shader look as closely as possible to the former version. - final MatCap texture was adjusted to closely replicate the former MatCap settings - Color multipliers were exposed as properties for easier tweaking - In the ToonShader subgraph, a Color was exposed as Vector4, this shouldn't make any difference but caused issues when used with Multiply nodes for some reason (output was too dark). * fix: avatars sometimes were instantiated with pink faces * remove unused code * refactor: code cleanup - deleted old materials - removed avatar specific logic out from AvatarMeshCombinerHelper and into AvatarRenderer - removed internal combining logic out from AvatarMeshCombinerHelper and into AvatarMeshCombiner * shadergraph cleanup * fix: corrupted avatars were generated due to combinedInstances meshes not matching layers meshes * add FlattenMaterial tests * add ResetBones() test * fix: compiler errors * regenerated ToonShader with _SSAO_OFF - also, added documentation on how to generate the ToonShaderCompiled.shader file. * chore: remove test requirement to publish build * add final tests implementation * add xml docs * Revert "chore: remove test requirement to publish build" This reverts commit 4509cf8 * visual test fixes - Now, wearable visual tests use the combiner - Fixed a failing visual test by adjusting the avatar material * fix: toon shadergraph issues - Base and emission UV encoded colors needed sRGB->Linear conversion to look properly - Removed hardcoded emission multiplier that's no longer needed (the color space conversion was bad all along?) - Avatar material clean-up and fixes * fixed remaining tests - regenerated some visual tests because they had 92-93% affinity due to a very slight luminance difference. * fix: toon shading too aggressive, adjusted multiply color to 65% value and fresnel set to 100% value and 1.2 hdr intensity. * add documentation to the shadergraph with instructions on how to test the shader * visual test failing with 95% of matching... come on * merge fixes * merge fixes * fix: tests failing * fix animation issues * temporarily disable cull opaque heuristic until we fix wearables * PR review fixes * update AlphaTestWearable baseline Co-authored-by: Alejandro Jimenez <50231608+AjimenezDCL@users.noreply.github.com> Co-authored-by: pbosio <pato@decentraland.org> Co-authored-by: Mateo Miccino <mateomiccino@gmail.com> Co-authored-by: Suduck <54064092+Suduck@users.noreply.github.com> Co-authored-by: Agustin Mendez <github@menduz.com> Co-authored-by: estefania colutta <estefania.colutta@etermax.com> Co-authored-by: Romina Marchetti <romi@decentraland.org> Co-authored-by: Pravus <pravus@decentraland.org> Co-authored-by: RominaMarchetti <51088292+RominaMarchetti@users.noreply.github.com> Co-authored-by: Suduck <adrian@suduck.com> Co-authored-by: Alejandro Jimenez <ajimenez@decentraland.org> Co-authored-by: Santi Andrade <sandrade@decentraland.org>
What does this PR fix?
This PR is the Unity side for the Fix #244. It has to be merged with the Kernel side (here).
BEFORE this change, when we jumped in to a scene from the "Explore & Play" window, the system tried to teleport us to a specific realm (choosed by the own Explore feature). When the joinning to this realm failed (because of the server down, a full realm, etc.), the feature was broken and we were not able to do the teleport.
NOW, after we try to jump in to a scene from the Explore, if the joinning to the specific realm fails, the system will automatically try to find the next better realm to go (we prioritize the list of available realms by number of users in each realm). Even if it is not be able to find any realm to go, it will finally use our current realm to do the teleport. In this way, the users will always be able to jump to the scene they wanted (although it has to be in another realm).
How to test the changes?
Our Code Review Standards
https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md