-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: sdk other players transform propagation #1030
feat: sdk other players transform propagation #1030
Conversation
…at/sdk-other-players-transform-propagation
# Conflicts: # Explorer/Assets/DCL/Character/CharacterMotion/Systems/WriteMainPlayerTransformSystem.cs # Explorer/Assets/DCL/Character/Plugin/CharacterContainer.cs # Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerProfileDataPropagationSystem.cs
Windows and Mac build successfull in Unity Cloud! You can find a link to the downloadable artifact below.
|
…-propagation' into feat/sdk-other-players-transform-propagation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please merge the recent changes from main
Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerProfileDataPropagationSystem.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs
Outdated
Show resolved
Hide resolved
…at/sdk-other-players-transform-propagation
I'll tackle this when I have some bandwith |
…at/sdk-other-players-transform-propagation
WalkthroughThe pull request introduces several modifications across multiple files, primarily focusing on enhancing the functionality of avatar and player transform systems within a multiplayer environment. Key changes include the addition of new properties in the Changes
Sequence Diagram(s)sequenceDiagram
participant Player
participant PlayerTransformPropagationSystem
participant WritePlayerTransformSystem
participant CRDTLayer
Player->>PlayerTransformPropagationSystem: Update Transform
PlayerTransformPropagationSystem->>WritePlayerTransformSystem: Propagate Transform
WritePlayerTransformSystem->>CRDTLayer: Send Transform Data
CRDTLayer-->>WritePlayerTransformSystem: Acknowledge
WritePlayerTransformSystem-->>PlayerTransformPropagationSystem: Acknowledge
PlayerTransformPropagationSystem-->>Player: Update Complete
Possibly related PRs
Suggested labels
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range and nitpick comments (3)
Explorer/Assets/Scripts/SceneRunner/Scene/ISceneFacade.cs (1)
43-89
: LGTM, but consider adding a comment to clarify the purpose of the class.The
Fake
class serves as a mock implementation of theISceneFacade
interface, which can be useful for testing or as a placeholder implementation. The changes are approved.However, consider adding a comment to clarify the purpose of the class, such as:
/// <summary> /// A mock implementation of the ISceneFacade interface for testing or placeholder purposes. /// </summary> class Fake : ISceneFacade { // ... }Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs (1)
24-69
: Test method looks good, but consider adding more test cases.The test method
PropagateTransform
is well-structured and follows the Arrange-Act-Assert pattern. It is testing the integration between thePlayerTransformPropagationSystem
and theWritePlayerTransformSystem
to ensure that the player transform is correctly propagated and written to the CRDT.The test method is using fake implementations for dependencies, which is a good practice for unit testing.
However, consider adding more test cases to cover edge cases and error scenarios, such as:
- Test with multiple players
- Test with different transform values
- Test with invalid or missing components
- Test error handling and logging
Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs (1)
Line range hint
1-241
: Consider the following optimizations for the Unity engine:
The
AvatarBase
class has a significant number of serialized fields, which can impact performance and memory usage. Consider optimizing the structure by grouping related fields into separate components or using a more efficient serialization approach.The
Awake
method inAvatarBase
class creates a newAnimatorOverrideController
and initializes theanimationOverrides
list. Ensure that this initialization is necessary and consider moving it to a lazy initialization approach to avoid unnecessary overhead.The
ReplaceEmoteAnimation
method inAvatarBase
class sets theruntimeAnimatorController
property of theAnimator
component. Frequently changing theruntimeAnimatorController
can be expensive, so consider optimizing this approach if it is called frequently.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (12)
- Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs (3 hunks)
- Explorer/Assets/DCL/Character/CharacterMotion/Systems/WriteMainPlayerTransformSystem.cs (2 hunks)
- Explorer/Assets/DCL/Character/Plugin/CharacterContainer.cs (1 hunks)
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs (1 hunks)
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs.meta (1 hunks)
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs (1 hunks)
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs.meta (1 hunks)
- Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs (1 hunks)
- Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs.meta (1 hunks)
- Explorer/Assets/DCL/PluginSystem/Global/MultiplayerPlugin.cs (1 hunks)
- Explorer/Assets/DCL/PluginSystem/World/MultiplayerPlugin.cs (1 hunks)
- Explorer/Assets/Scripts/SceneRunner/Scene/ISceneFacade.cs (1 hunks)
Files skipped from review due to trivial changes (4)
- Explorer/Assets/DCL/Character/CharacterMotion/Systems/WriteMainPlayerTransformSystem.cs
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs.meta
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs.meta
- Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs.meta
Additional context used
Path-based instructions (8)
Explorer/Assets/DCL/PluginSystem/World/MultiplayerPlugin.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/Scripts/SceneRunner/Scene/ISceneFacade.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/DCL/Character/Plugin/CharacterContainer.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/DCL/PluginSystem/Global/MultiplayerPlugin.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.
Additional comments not posted (12)
Explorer/Assets/DCL/PluginSystem/World/MultiplayerPlugin.cs (1)
34-34
: LGTM!The code change is approved for the following reasons:
- The injection of
WritePlayerTransformSystem
into the world builder is consistent with the existing code structure and follows the pattern of injecting systems.- The change does not introduce any heap allocations or require specific Unity engine optimizations.
- The AI-generated summary provides additional context, indicating that this change enhances the functionality by integrating the
WritePlayerTransformSystem
into the existing architecture and allowing it to utilize thesharedDependencies.SceneData
alongside the previously injected systems.Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs (1)
28-28
: Consider usingTransformComponent
instead ofIAvatarView
.As mentioned in the previous comment by mikhail-dcl, consider using
TransformComponent
instead ofIAvatarView
for consistency with other systems and to avoid potential issues with the avatar system.Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs (4)
39-39
: The code still usesPlayerCRDTEntity
, indicating that the suggested change toPlayerSceneCRDTEntity
has not been made.
47-47
: The code does not useExposedTransformUtils
as suggested. Could you please clarify the benefits of usingExposedTransformUtils
in this context?
37-52
: LGTM!The
UpdateSDKTransform
query correctly updates the SDK transform for player entities, excluding the main player. The position conversion to scene-relative coordinates and the usage ofecsToCRDTWriter.PutMessage
are appropriate for proper synchronization.
54-59
: LGTM!The
HandleComponentRemoval
query correctly handles the removal of theSDKTransform
component when aDeleteEntityIntention
component is present. The usage ofecsToCRDTWriter.DeleteMessage
is appropriate for removing the component from the CRDT layer.Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs (1)
71-107
: Helper class looks good.The helper class
FakeECSToCRDTWriter
is a simple fake implementation ofIECSToCRDTWriter
interface for testing purposes. It is storing the messages sent to the writer in a list ofMessage
objects, which is a good way to store the message data for assertions.The class is not implementing all the methods of the interface, but that is acceptable for the current test case. The class can be extended to support more test cases in the future if needed.
Explorer/Assets/DCL/Character/Plugin/CharacterContainer.cs (1)
125-125
: LGTM, but verify the impact of the change.The renaming of the method from
WritePlayerTransformSystem.InjectToWorld
toWriteMainPlayerTransformSystem.InjectToWorld
suggests a shift in functionality or focus of the system being invoked. This change is approved.However, ensure that this change is thoroughly tested to confirm that it behaves as expected and does not introduce any unintended side effects or performance regressions in the handling of player transformations within the world-building process.
Run the following script to verify the impact of the change:
Verification successful
Change appears consistent, but recommend runtime testing.
The renaming of the method to
WriteMainPlayerTransformSystem.InjectToWorld
aligns with its role in handling the main player transform, as indicated by the comments and usage in the codebase. No immediate issues or performance regressions were identified from the code analysis. However, it is advisable to conduct runtime testing to ensure that no performance regressions occur due to this change.
- Ensure runtime testing is performed to confirm the absence of performance regressions.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the change on the functionality and performance of the player transformation handling. # Test 1: Search for potential side effects or performance regressions related to the change. rg --type csharp -A 5 $'WriteMainPlayerTransformSystem' # Test 2: Search for potential issues in the handling of player transformations within the world-building process. ast-grep --lang csharp --pattern $'InjectToWorld($_, $_, $_, $_, $_, $_, $_, $_)'Length of output: 4611
Explorer/Assets/DCL/PluginSystem/Global/MultiplayerPlugin.cs (1)
133-133
: LGTM! Verify the implementation ofPlayerTransformPropagationSystem.InjectToWorld
.The addition of the
PlayerTransformPropagationSystem.InjectToWorld
call is approved, as it enhances the functionality related to player transformations in the multiplayer environment.However, please ensure that the implementation of
PlayerTransformPropagationSystem.InjectToWorld
follows best practices:
- Review the code for unnecessary heap allocations and optimize them if needed.
- Review the code for Unity-specific optimizations and apply them if needed.
Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs (3)
160-162
: LGTM!The
Position
andRotation
properties are consistent with theAvatarBase
class and provide a way to access the avatar's position and rotation through the interface.
186-195
: LGTM!The
Fake
class provides a mock implementation of theIAvatarView
interface, which can be useful for testing or as a placeholder during development. The constructor allows creating instances with specific position and rotation values.
197-240
: LGTM!The
Fake
class provides a complete implementation of theIAvatarView
interface, with each method throwing aNotImplementedException
. This is expected behavior for a mock implementation and serves as a placeholder for future development.
Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/DCL/AvatarRendering/AvatarShape/UnityInterface/AvatarBase.cs
Outdated
Show resolved
Hide resolved
…sedTransformUtils.Put() + other minor improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
Explorer/Assets/Scripts/ECS/TestSuite/EcsTestsUtils.cs (1)
25-25
: Heap allocations and consistency improvement suggestionsThe code changes are creating new
SDKTransform
,CanBeDirty<Vector3>
, andCanBeDirty<Quaternion>
objects which will result in heap allocations. Consider the following suggestions to potentially improve performance and consistency:
If possible, consider reusing existing
SDKTransform
objects instead of creating new ones to reduce heap allocations. This may require changes to the calling code to pass in an existingSDKTransform
object.For consistency with the
Position
andRotation
properties, consider wrapping theScale
property in aCanBeDirty<Vector3>
type as well:-Scale = Vector3.one +Scale = new CanBeDirty<Vector3>(Vector3.one)Overall, the changes look good and enhance the functionality by allowing for more nuanced state management of the transform properties.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs (1 hunks)
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs (1 hunks)
- Explorer/Assets/DCL/SDKComponents/Tween/Components/CustomTweener/CustomTweenerImpl.cs (3 hunks)
- Explorer/Assets/Scripts/CrdtEcsBridge/Components/Transform/SDKTransform.cs (2 hunks)
- Explorer/Assets/Scripts/CrdtEcsBridge/Components/Transform/SDKTransformSerializer.cs (1 hunks)
- Explorer/Assets/Scripts/ECS/TestSuite/ECS.TestSuite.asmdef (1 hunks)
- Explorer/Assets/Scripts/ECS/TestSuite/EcsTestsUtils.cs (2 hunks)
- Explorer/Assets/Scripts/ECS/Unity/Transforms/ExposedTransformUtils.cs (1 hunks)
- Explorer/Assets/Scripts/ECS/Unity/Transforms/Tests/UpdateTransformSystemShould.cs (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- Explorer/Assets/DCL/Multiplayer/SDK/Systems/GlobalWorld/PlayerTransformPropagationSystem.cs
Additional context used
Path-based instructions (7)
Explorer/Assets/Scripts/ECS/Unity/Transforms/ExposedTransformUtils.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/Scripts/CrdtEcsBridge/Components/Transform/SDKTransformSerializer.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/Scripts/ECS/TestSuite/EcsTestsUtils.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/Scripts/ECS/Unity/Transforms/Tests/UpdateTransformSystemShould.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/Scripts/CrdtEcsBridge/Components/Transform/SDKTransform.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.Explorer/Assets/DCL/SDKComponents/Tween/Components/CustomTweener/CustomTweenerImpl.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.
Additional comments not posted (16)
Explorer/Assets/Scripts/ECS/Unity/Transforms/ExposedTransformUtils.cs (2)
18-18
: LGTM!The code changes are approved. The position is being correctly assigned using the
ParcelMathHelper.GetSceneRelativePosition
method to convert from local space to scene space. There are no heap allocations or Unity engine optimizations needed here.
19-19
: LGTM!The code changes are approved. The rotation is being correctly assigned directly from
data.Item1.Rotation.Value
. There are no heap allocations or Unity engine optimizations needed here.Explorer/Assets/Scripts/CrdtEcsBridge/Components/Transform/SDKTransformSerializer.cs (2)
14-15
: LGTM!The code changes are approved. The deserialization logic for
Position
andRotation
properties is correctly implemented by accessing theirValue
property from thepointer
variable.
23-24
: LGTM!The code changes are approved. The serialization logic for
Position
andRotation
properties is correctly implemented by writing theirValue
property to thepointer
variable.Explorer/Assets/Scripts/ECS/TestSuite/ECS.TestSuite.asmdef (1)
21-22
: LGTM!The addition of new GUID entries to the list of referenced assemblies is a valid change that expands the project's capabilities without introducing any issues. The existing dependencies remain intact.
The code changes are approved.
Explorer/Assets/Scripts/ECS/Unity/Transforms/Tests/UpdateTransformSystemShould.cs (2)
10-10
: LGTM!The addition of the
Utility
namespace is approved.
23-23
: LGTM, but verify the impact on the transform update system.The change to initialize the
Position
property using theCanBeDirty<Vector3>
wrapper class is approved. This modification suggests an enhancement in managing the position data by allowing more sophisticated handling of the "dirty" state of the transform.However, please ensure that this change does not introduce any unintended side effects on the transform update system. Verify that the system correctly handles the new
CanBeDirty<Vector3>
wrapper and that the position updates are propagated as expected.Explorer/Assets/Scripts/CrdtEcsBridge/Components/Transform/SDKTransform.cs (4)
16-16
: LGTM!The code changes are approved.
18-19
: LGTM!The code changes are approved. The use of
CanBeDirty<T>
wrapper forPosition
andRotation
properties is a good practice for serialization/deserialization. The default values are assigned usingVector3.zero
andQuaternion.identity
, which are static readonly fields and do not introduce any heap allocations.
20-21
: LGTM!The code changes are approved. The explicit interface implementations for
IExposedTransform.Position
andIExposedTransform.Rotation
properties provide a way to access thePosition
andRotation
properties through theIExposedTransform
interface. The implementations do not introduce any heap allocations or impact Unity engine optimizations.
45-46
: LGTM!The code changes are approved. Resetting the values of
Position
andRotation
properties through theirValue
properties in theClear
method ensures that the dirty state is managed correctly. The changes do not introduce any heap allocations or impact Unity engine optimizations.Explorer/Assets/DCL/Multiplayer/SDK/Systems/SceneWorld/WritePlayerTransformSystem.cs (2)
1-61
: LGTM!The code changes are approved. The system is well-structured, follows best practices, and correctly handles updating player transform data and component removal.
1-61
: Addressing past review comments:mikhail-dcl: In the scene context
PlayerCRDTEntity
is changed toPlayerSceneCRDTEntity
The code correctly uses
PlayerSceneCRDTEntity
throughout the system.mikhail-dcl: Can't you use
ExposedTransformUtils
instead?The code correctly uses
ExposedTransformUtils
to update the transform data.Explorer/Assets/DCL/SDKComponents/Tween/Components/CustomTweener/CustomTweenerImpl.cs (3)
30-34
: LGTM!The code changes in the
SetResult
method are approved. The changes align with the goal of improving the encapsulation of theSDKTransform
structure by accessing thePosition
andRotation
properties through their respectiveValue
properties.
57-58
: LGTM!The code changes in the
SetResult
method are approved. The changes align with the goal of improving the encapsulation of theSDKTransform
structure by accessing thePosition
andRotation
properties through their respectiveValue
properties.
82-84
: LGTM!The code changes in the
SetResult
method are approved. The changes align with the goal of improving the encapsulation of theSDKTransform
structure by accessing theRotation
andPosition
properties through their respectiveValue
properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs (1 hunks)
Additional context used
Path-based instructions (1)
Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs (2)
Pattern
**/*.cs
: Review the code for heap allocations and suggest potential improvements to avoid runtime allocations.
Pattern
**/*.cs
: Review the code for specific unity engine optimizations and suggest potential improvements.
Additional comments not posted (1)
Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs (1)
77-113
: LGTM!The
FakeECSToCRDTWriter
class is a fake implementation used for testing purposes, and it looks good as is. It correctly implements thePutMessage
method and stores the messages in a list for later verification. The other methods of the interface are not implemented, but that's expected for a fake implementation.
Explorer/Assets/DCL/Multiplayer/SDK/Tests/PropagateTransformTest.cs
Outdated
Show resolved
Hide resolved
I'll try to replace the |
…at/sdk-other-players-transform-propagation
…at/sdk-other-players-transform-propagation
PBPlayerIdentityData
etc...)Snippet for testing the reading of the other players transform in a scene using SDK:
Summary by CodeRabbit
New Features
PlayerTransformPropagationSystem
to manage player transform data in multiplayer environments.WritePlayerTransformSystem
for real-time updates of player positions and rotations.Fake
classes forIAvatarView
andISceneFacade
.MultiplayerPlugin
to include new systems for improved player transformation handling.Bug Fixes
Tests