Warning
Warning: Unity Simulation is deprecated as of December 2023, and is no longer available.
Best Practices
Camera Affinity
Camera Affinity is used in Camera Affinity, Lock Step Sync and Scene Serialization mode. While any number of Clients can be run for a project, while running with Camera Affinity or Scene Serialization Mode make sure to run as many Clients as the camera nodes in the scene. And, with Lock Step Sync mode make sure to run as many Clients as one less than the number of camera nodes in the scene, since the Server also renders one camera (specified using the
isServercheckbox in a camera node).For example, if there are
ncamera nodes in the scene, launchnClients for Camera Affinity and Scene Serialization mode, and(n-1)Clients for Lock Step Sync mode.Avoiding tagging unnecessary GameObjects
While using Asynchronous, Lock Step Sync or Camera Affinity mode, the GameObjects need to be tagged by the user. And while there is no limit on the number of GameObjects that can be tagged in a scene, it is advised to tag only the GameObjects that are dynamic, and to avoid tagging GameObjects that are static so as to reduce the network latency.
Animate with the Culling Mode set to “Always Animate”
Animation updates in Lock Step Sync mode take place with respect to the Server. Due to this, an animated GameObject that might not be in field of view of the main Server camera might not update, even though it might be visible to other Client cameras. Setting the Culling Mode of the GameObject Animator as
Always Animatemakes sure this doesn't happen.
Troubleshooting
Q: After upgrading the package version, I get build errors or runtime exceptions. How do I fix this?
A: This is a general Unity error caused by reusing intermediate build files. It can be resolved by deleting the Library directory, deleting the build directories, and re-importing the packages. For more information, visit this site.
Q: Some GameObjects in the project are not changing in the Clients, even though they have an IncludeInDistributedRendering component on them. What could be a reason for this?
A: This might happen when some GameObjects have been duplicated, which is why they might have duplicate IDs despite having a IncludeInDistributedRendering component on them. To fix this, click on the Validate Scene Objects button in the Distributed Rendering Configuration Menu. This assigns new IDs to the duplicates in one go.
Q: The Clients are slow and tend to lag sometimes when run locally. Why does this happen?
A: Make sure to observe the GPU utilization while spinning up more Clients locally. Depending upon the rendering workload, the GPU might get saturated and might lead to drop in FPS on the Client.
Q: When I try to send input commands (like pressing the WASD keys) to my simulation, nothing happens. Why?
A: The InputManager will only be active to the Server instance. The render nodes will not react to mouse or keyboard input.