public static void SharedVisualizeTestResults(
            ITempList <TestResult> physicsTestResults,
            CollisionGroup collisionGroup)
        {
            if (IsClient)
            {
                using var testResults = Api.Shared.GetTempList <Vector2D>();
                AddTestResults(physicsTestResults.AsList(), testResults.AsList());
                ClientComponentPhysicsSpaceVisualizer.VisualizeTestResults(testResults.AsList(),
                                                                           collisionGroup,
                                                                           isClient: true);
            }
            else // if server
            {
                Api.Assert(Api.IsEditor, "This is Editor-only server code");
                var allPlayers = Server.Characters.EnumerateAllPlayerCharacters(onlyOnline: true,
                                                                                exceptSpectators: false);

                var testResults = new List <Vector2D>();
                AddTestResults(physicsTestResults.AsList(), testResults);

                var collisionGroupId = CollisionGroups.GetCollisionGroupId(collisionGroup);
                instance.CallClient(
                    allPlayers,
                    // ReSharper disable once AccessToDisposedClosure
                    _ => _.ClientRemote_ProcessServerTestResults(testResults, collisionGroupId));
            }
        }
        private void ClientRemote_ProcessServerTestResults(
            List <Vector2D> testResults,
            CollisionGroupId collisionGroupId)
        {
            var collisionGroup = CollisionGroups.GetCollisionGroup(collisionGroupId);

            ClientComponentPhysicsSpaceVisualizer.VisualizeTestResults(testResults,
                                                                       collisionGroup,
                                                                       isClient: false);
        }