private IEnumerator runTests()
        {
            frameCount = 0;
            yield return(RadicalCoroutine.Run(this, waitForSecondsTest(), "waitForSecondsTest"));

            frameCount = 0;
            yield return(RadicalCoroutine.Run(this, waitForNextFrameTest(), "waitForNextFrameTest"));

            frameCount = 0;
            yield return(RadicalCoroutine.Run(this, waitForFrameTest(), "waitForFrameTest"));

            frameCount = 0;
            yield return(RadicalCoroutine.Run(this, waitForCompositeReturnTest(), "waitForCompositeReturn"));

            yield return(RadicalCoroutine.Run(this, waitForFrameCancelledTest(), "waitForFrameCancelledTest"));

            yield return(RadicalCoroutine.Run(this, waitForDisposedEventTest(), "WaitForDisposedEventTest"));

            yield return(RadicalCoroutine.Run(this, waitForCompletedEventTest(), "waitForCompletedEventTest"));

            yield return(RadicalCoroutine.Run(this, waitForPausedEventTest(), "waitForPausedEventTest"));

            yield return(RadicalCoroutine.Run(this, waitForResumedEventTest(), "waitForResumedEventTest"));

            yield return(RadicalCoroutine.Run(this, cannotAddListenerToEmptyEnumerator(), "cannotAddListenerToEmptyEnumerator"));

            yield return(RadicalCoroutine.Run(this, waitForNestedIEnumeratorTest(), "waitForNestedIEnumeratorTest"));

            IntegrationTest.Pass();
        }
        /// <summary>
        ///     WIP todo full integration tests
        /// </summary>

        // [Fact]
        public void IndexAdmin()
        {
            // arrange
            var server = IntegrationTest.RunTestHost();
            var client = server.CreateClient();

            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Test");
            //
            // var user = IntegrationTest.MockUsers("Admin").GetAwaiter().GetResult();
            // Thread.CurrentPrincipal = user.Principal;
            // var controller = mocker.CreateInstance<HomeController>();
            var request = new HttpRequestMessage(HttpMethod.Post, "/Home");

            request.Headers.Authorization = new AuthenticationHeaderValue("Test");
            // Act
            var response = client.SendAsync(request).GetAwaiter().GetResult();

            // Assert
            var responseString = response.Content.ReadAsStringAsync().GetAwaiter().GetResult();

            Assert.Contains("Pavlov Rcon Webserver", responseString);
            Assert.Contains("User Management", responseString);
            Assert.Contains("Servers", responseString);
            Assert.Contains("Matchmaking", responseString);
            //DefaultDB(true);
        }
Пример #3
0
        public void CheckTestResult()
        {
            if (flowchart == null)
            {
                IntegrationTest.Fail("Flowchart object not selected");
                return;
            }

            // Check Fungus variables are populated with expected values
            if (flowchart.GetVariable <BooleanVariable>("BoolVar").value != true ||
                flowchart.GetVariable <IntegerVariable>("IntVar").value != 5 ||
                flowchart.GetVariable <FloatVariable>("FloatVar").value != 22.1f ||
                flowchart.GetVariable <StringVariable>("StringVar").value != "a string")
            {
                IntegrationTest.Fail("Fungus variables do not match expected values");
                return;
            }

            // Check the right number of methods were invoked successfully
            if (passCount == 11)
            {
                IntegrationTest.Pass();
            }
            else
            {
                IntegrationTest.Fail("A method did not get invoked or parameter was incorrect");
            }
        }
Пример #4
0
 private void OnFadeInCompleteCallback()
 {
     if (audioPlayer.AudioSource.volume == 1)
     {
         IntegrationTest.Pass(gameObject);
     }
 }
Пример #5
0
    private IEnumerator TestEmojiInText(Text textComponent, string emojiString)
    {
        chatInputField.text = emojiString;
        yield return(null);

        IntegrationTest.Assert(textComponent.preferredWidth > 0f, "Failed for emojiString: " + emojiString);
    }
Пример #6
0
    private IEnumerator TestQueueInit()
    {
        for (int i = 0; i < m_SpawnCount; i++)
        {
            m_Pool.Instantiate();
        }

        yield return(new WaitForSeconds(2.5f));

        for (int i = 0; i < m_SpawnCount; i++)
        {
            m_Pool.Instantiate();
        }

        if (transform.childCount > m_SpawnCount)
        {
            IntegrationTest.Fail("To many prefabs were created");
        }
        else if (transform.childCount < m_SpawnCount)
        {
            IntegrationTest.Fail("To few prefabs were created");
        }
        else
        {
            IntegrationTest.Pass();
        }
    }
Пример #7
0
        private void Start()
        {
            IntegrationTestManager testManager = new IntegrationTestManager();
            Mesh mesh = testManager.mesh;

            testManager.CreateBox();

            mesh.vertices.BuildVertices();
            mesh.triangles.BuildTriangles();

            ExportObj exportObj = new ExportObj();

            exportObj.vertices      = mesh.uMesh.vertices;
            exportObj.triangles     = mesh.triangles.triangles.ToArray();
            exportObj.materials     = mesh.materials.GetMaterials();
            exportObj.materialNames = mesh.materials.MaterialNames();
            exportObj.Save("Temp/test.obj");

            ImportObj importObj = new ImportObj();

            importObj.Load("Temp/test.obj");
            testManager.Assert(importObj.vertices.Count == 8);
            testManager.Assert(importObj.triangles.Count == 12 * 3);
            testManager.Assert(importObj.materialNames.Count == 12);
            testManager.Assert(importObj.materials.Count == 1);

            testManager.Assert(File.Exists("Temp/test.obj"));
            File.Delete("Temp/test.obj");
            testManager.Assert(File.Exists("Temp/test.mtl"));
            File.Delete("Temp/test.mtl");

            IntegrationTest.Pass(gameObject);
        }
 void OnCommandExecute(Block block, Command command, int commandIndex, int maxCommandIndex)
 {
     IntegrationTest.Assert(commandIndex == 0);
     IntegrationTest.Assert(maxCommandIndex == 1);
     IntegrationTest.Assert(command.GetType() == typeof(Wait));
     commandExecuted = true;
 }
Пример #9
0
 void Update()
 {
     IntegrationTest.Assert(card.GetComponent <HasPhysicalCard>().PhysicalCardGO != null);
     IntegrationTest.Assert(card.GetComponent <HasOutline>().OutlineGO != null);
     Destroy(card);
     IntegrationTest.Pass(gameObject);
 }
Пример #10
0
    private IEnumerator TestFaderObjectRemoval()
    {
        yield return(new WaitForFixedUpdate());

        IntegrationTest.Assert(GameObject.Find("Fade") == null, "Fader game object should be removed at the end of fading");
        IntegrationTest.Pass();
    }
Пример #11
0
        void OnBlockEnd(Block block)
        {
            IntegrationTest.Assert(started);
            IntegrationTest.Assert(commandExecuted);

            IntegrationTest.Pass();
        }
        protected override IEnumerator runTest()
        {
            BundleMount bundleMount  = loadAndMount("DependencyBundlesTest/main.unity3d", null, isDependency: false);
            BundleMount bundleMount2 = loadAndMount("DependencyBundlesTest/dep1.unity3d", new HashSet <BundleMount> {
                bundleMount
            }, isDependency: true);
            BundleMount bundleMount3 = loadAndMount("DependencyBundlesTest/dep2.unity3d", new HashSet <BundleMount> {
                bundleMount2, bundleMount
            }, isDependency: true);

            bundleMount.IsPinned = true;
            IntegrationTest.Assert(bundleMount.IsPinned, "DependencyBundlesTest/main.unity3d");
            IntegrationTest.Assert(bundleMount2.IsPinned, "DependencyBundlesTest/dep1.unity3d");
            IntegrationTest.Assert(bundleMount3.IsPinned, "DependencyBundlesTest/dep2.unity3d");
            bundleMount.IsPinned = false;
            IntegrationTest.Assert(!bundleMount.IsPinned, "DependencyBundlesTest/main.unity3d");
            IntegrationTest.Assert(bundleMount2.IsPinned, "DependencyBundlesTest/dep1.unity3d");
            IntegrationTest.Assert(bundleMount3.IsPinned, "DependencyBundlesTest/dep2.unity3d");
            bundleMount3.IsPinned = true;
            IntegrationTest.Assert(!bundleMount.IsPinned, "DependencyBundlesTest/main.unity3d");
            IntegrationTest.Assert(bundleMount2.IsPinned, "DependencyBundlesTest/dep1.unity3d");
            IntegrationTest.Assert(bundleMount3.IsPinned, "DependencyBundlesTest/dep2.unity3d");
            bundleMount.Unload(unloadAllLoadedObjects: true);
            bundleMount2.Unload(unloadAllLoadedObjects: true);
            bundleMount3.Unload(unloadAllLoadedObjects: true);
            yield break;
        }
Пример #13
0
        protected override IEnumerator runTest()
        {
            string        key       = "embedded_asset_test";
            TextAsset     bundleTxt = Resources.Load <TextAsset>(key + ".unity3d");
            AssetBundle   bundle    = AssetBundle.LoadFromMemory(bundleTxt.bytes);
            BundleManager manager   = Content.BundleManager;
            BundleMount   mount     = manager.MountBundle(key, bundle);
            AsyncAssetBundleRequest <TextAsset> assetRequest = mount.LoadAsync <TextAsset>("embeddedasseta", "embeddedasseta.txt");

            manager.UnmountBundle(key, unloadAllLoadedObjects: false);
            if (manager.IsMounted(key))
            {
                IntegrationTest.Fail("Bundle should not be considered mounted while waiting to unmount.");
            }
            if (!manager.IsUnmounting(key))
            {
                IntegrationTest.Fail("Bundle should be in the process of unmounting.");
            }
            yield return(assetRequest);

            if (assetRequest.Asset == null)
            {
                IntegrationTest.Fail("Failed to load asset");
            }
            yield return(null);

            IntegrationTest.Assert(!manager.IsMounted(key));
            IntegrationTest.Assert(!manager.IsUnmounting(key));
        }
Пример #14
0
    public void TakeDamage(int amount)      //When enemy deal damage, THEY will call this function
    {
        //for unit testing
        int previousHealth = currentHealth;

        currentHealth -= amount;
        if (currentHealth < 0)
        {
            currentHealth = 0;
        }

        if (currentHealth != previousHealth - amount)
        {
            IntegrationTest.Fail(gameObject);
        }
        IntegrationTest.Pass(gameObject);

        healthSlider.value = currentHealth;         //Adjusting the player's health bar UI


        if (currentHealth <= 0 && !isDead)
        {
            Death();
        }
    }
Пример #15
0
 // Update is called once per frame
 void Update()
 {
     if (other != null && Time.time > nextTime && Time.time <= maxTime)
     {
         if (ai.enabled)
         {
             IntegrationTest.Fail();
         }
         else
         {
             check = true;
             nextTime++;
         }
     }
     if (Time.time > (maxTime + 0.1f) && check)
     {
         if (ai.enabled)
         {
             IntegrationTest.Pass();
         }
         else
         {
             IntegrationTest.Fail();
         }
     }
 }
Пример #16
0
    //To test whether the correct side has been wiped after activation
    public void KillOneSideTest(bool playerFacing)
    {
        GameObject[]  testEnemy;
        EnemyMovement enemyMovement;

        testEnemy = GameObject.FindGameObjectsWithTag("Enemy");
        //There should be no more enemy
        for (int i = 0; i < testEnemy.Length; i++)
        {
            if (playerFacing)
            {
                if (testEnemy[i].transform.position.x > player.transform.position.x)
                {
                    enemyMovement = testEnemy [i].GetComponent <EnemyMovement> ();
                    if (enemyMovement.speed != 0)
                    {
                        IntegrationTest.Fail(gameObject);
                    }
                }
            }
            else
            {
                if (testEnemy[i].transform.position.x < player.transform.position.x)
                {
                    enemyMovement = testEnemy [i].GetComponent <EnemyMovement> ();
                    if (enemyMovement.speed != 0)
                    {
                        IntegrationTest.Fail(gameObject);
                    }
                }
            }
        }
        IntegrationTest.Pass(gameObject);
    }
Пример #17
0
        protected override IEnumerator runTest()
        {
            string payload = string.Format("{0}?dl=bytes:mock-text-asset", "Configuration/embedded_content_manifest");

            ContentManifest.AssetEntry entry = ContentManifest.AssetEntry.Parse(payload);
            DeviceManager manager            = new DeviceManager();

            manager.Mount(new MockTextAssetDevice(manager));
            manager.Mount(new BytesDevice(manager));
            AssetRequest <byte[]> request = manager.LoadAsync <byte[]>(entry.DeviceList, ref entry);

            if (request == null)
            {
                IntegrationTest.Fail("request == null");
                yield break;
            }
            yield return(request);

            IntegrationTestEx.FailIf(!request.Finished);
            IntegrationTestEx.FailIf(request.Cancelled);
            IntegrationTestEx.FailIf(request.Asset == null);
            IntegrationTestEx.FailIf(request.Asset == null);
            if (request.Asset != null)
            {
                string key   = entry.Key;
                byte[] bytes = Resources.Load <TextAsset>(key).bytes;
                IntegrationTestEx.FailIf(!request.Asset.SequenceEqual(bytes));
            }
            IntegrationTest.Pass();
        }
Пример #18
0
    void testMovement()
    {
        if (startingY != GetComponent <Transform>().position.y)
        {
            IntegrationTest.Fail(gameObject);
        }
        else
        {
            IntegrationTest.Pass(gameObject);
        }

        if (startingZ != GetComponent <Transform>().position.z)
        {
            IntegrationTest.Fail(gameObject);
        }
        else
        {
            IntegrationTest.Pass(gameObject);
        }

        if (startingX == GetComponent <Transform>().position.x)
        {
            IntegrationTest.Fail(gameObject);
        }
        else
        {
            IntegrationTest.Pass(gameObject);
        }
    }
Пример #19
0
 /// <summary>
 /// Event like FixedUpdate
 /// </summary>
 public void PlatformerUpdate(float delta)
 {
     if (UpdateManager.instance.runningTime > testDuration)
     {
         IntegrationTest.Pass(gameObject);
     }
 }
Пример #20
0
        public IEnumerator StateMachine()
        {
            TestRunnerCallback.RunStarted(Application.platform.ToString(), testToRun);
            while (true)
            {
                if (testToRunQueue.Count == 0 && currentTest == null)
                {
                    FinishTestRun();
                    break;
                }
                if (currentTest == null)
                {
                    StartNewTest();
                }
                if (currentTest != null)
                {
                    if (testState == TestState.Running)
                    {
                        if (assertionsToCheck != null && assertionsToCheck.All(a => a.checksPerformed > 0))
                        {
                            IntegrationTest.Pass(currentTest.go);
                            testState = TestState.Success;
                        }
                        if (currentTest != null && Time.time > startTime + currentTest.TestComponent.timeout)
                        {
                            testState = TestState.Timeout;
                        }
                    }

                    switch (testState)
                    {
                    case TestState.Success:
                        LogMessage(finishedMessage);
                        FinishTest(TestResult.ResultType.Success);
                        break;

                    case TestState.Failure:
                        LogMessage(failedMessage);
                        FinishTest(TestResult.ResultType.Failed);
                        break;

                    case TestState.Exception:
                        LogMessage(failedExceptionMessage);
                        FinishTest(TestResult.ResultType.FailedException);
                        break;

                    case TestState.Timeout:
                        LogMessage(timeoutMessage);
                        FinishTest(TestResult.ResultType.Timeout);
                        break;

                    case TestState.Ignored:
                        LogMessage(ignoredMessage);
                        FinishTest(TestResult.ResultType.Ignored);
                        break;
                    }
                }
                yield return(null);
            }
        }
Пример #21
0
    private void OnIncComplete()
    {
        Assert.AreEqual(_incLoopCount, _incLoopsTotal, string.Format("Increase Loop count mismatch. Got {0}, expected {1}", _incLoopCount, _incLoopsTotal));

        // This is the longest test, so it will call Success if it passes
        IntegrationTest.Pass();
    }
 protected override void Check()
 {
     if (rb != null)
     {
         IntegrationTest.Pass(gameObject);
     }
 }
Пример #23
0
        IEnumerator Run()
        {
            GlobalCompositionRoot.Instance.EnsureIsInitialized();

            var testMethods = this.GetType().GetAllMethods(
                BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
                              .Where(x => x.GetCustomAttributes(typeof(InstallerTestAttribute), false).Any()).ToList();

            foreach (var method in testMethods)
            {
                var wrapper = new InstallerWrapper();
                wrapper.InstallCallback = () =>
                {
                    Container = wrapper.GetContainer();
                    method.Invoke(this, new object[0]);
                };

                var settings = new SceneCompositionRoot.StaticSettings()
                {
                    Installers = new List <IInstaller>()
                    {
                        wrapper
                    },
                    ParentNewObjectsUnderRoot = true,
                    OnlyInjectWhenActive      = true,
                };

                var oldRootObjects = this.gameObject.scene.GetRootGameObjects();

                var root = SceneCompositionRoot.Instantiate(gameObject, settings);

                // Wait a few frames to have it start up
                yield return(null);

                yield return(null);

                yield return(null);

                yield return(null);

                GameObject.Destroy(root.gameObject);

                foreach (Transform childTransform in this.gameObject.transform)
                {
                    GameObject.Destroy(childTransform.gameObject);
                }

                foreach (var obj in this.gameObject.scene.GetRootGameObjects().Except(oldRootObjects))
                {
                    GameObject.Destroy(obj);
                }

                yield return(null);

                Log.Trace("Installer Test '{0}' passed successfully", method.Name);
            }

            Log.Trace("All Installer Tests passed successfully");
            IntegrationTest.Pass();
        }
Пример #24
0
        private IEnumerable login(TestGuest guest, Action <ISession> callback)
        {
            ISession              session   = null;
            bool                  done      = false;
            Action <ISession>     onSuccess = null;
            Action <ILoginResult> onFailed  = null;

            onSuccess = delegate(ISession s)
            {
                mixLoginCreateService.OnLoginSuccess -= onSuccess;
                mixLoginCreateService.OnLoginFailed  -= onFailed;
                session = s;
                done    = true;
            };
            onFailed = delegate
            {
                mixLoginCreateService.OnLoginSuccess -= onSuccess;
                mixLoginCreateService.OnLoginFailed  -= onFailed;
                IntegrationTest.Fail("Couldn't create a session");
                done = true;
            };
            mixLoginCreateService.OnLoginSuccess += onSuccess;
            mixLoginCreateService.OnLoginFailed  += onFailed;
            mixLoginCreateService.Login(guest.Username, guest.Password);
            while (!done)
            {
                yield return(null);
            }
            callback(session);
        }
Пример #25
0
    void Update()
    {
        if (UpdateCount == 0)
        {
            IntegrationTest.Assert(_outline.WantedColor.a <= 0.0f);
        }
        else if (UpdateCount == 1)
        {
            _outline.Request(this, Color.red);
        }
        else if (UpdateCount == 2)
        {
            IntegrationTest.Assert(_outline.WantedColor == Color.red);
            _outline.Request(_outline, Color.black);
        }
        else if (UpdateCount == 3)
        {
            IntegrationTest.Assert(_outline.WantedColor == Color.red);
            _outline.Revoke(this);
        }
        else if (UpdateCount == 4)
        {
            IntegrationTest.Assert(_outline.WantedColor == Color.black);

            Destroy(_card);

            IntegrationTest.Pass(gameObject);
        }

        UpdateCount++;
    }
Пример #26
0
        protected override IEnumerator runTest()
        {
            string testPath = Path.Combine(Directory.GetCurrentDirectory(), "Assets/Generated/Resources/Configuration/embedded_content_manifest.txt");
            string payload  = $"{testPath}?dl=file-bytes&x=txt";

            ContentManifest.AssetEntry entry = ContentManifest.AssetEntry.Parse(payload);
            DeviceManager manager            = new DeviceManager();

            manager.Mount(new FileBytesDevice(manager));
            AssetRequest <byte[]> request = manager.LoadAsync <byte[]>(entry.DeviceList, ref entry);

            if (request == null)
            {
                IntegrationTest.Fail("request == null");
            }
            else
            {
                yield return(request);

                IntegrationTestEx.FailIf(!request.Finished);
                IntegrationTestEx.FailIf(request.Cancelled);
                IntegrationTestEx.FailIf(request.Asset == null);
                IntegrationTestEx.FailIf(request.Asset == null);
                string path = "Configuration/embedded_content_manifest.json";
                IntegrationTestEx.FailIf(!Enumerable.SequenceEqual(second: Resources.Load <TextAsset>(path).bytes, first: request.Asset));
            }
            IntegrationTest.Pass();
        }
Пример #27
0
    void Update()
    {
        if (UpdateCount == 0)
        {
            IntegrationTest.Assert(_mouse_over.MouseOver == false);
        }
        else if (UpdateCount == 1)
        {
            Vector3 middle_of_screen = new Vector3(Screen.width * 0.5f, Screen.height * 0.5f, 0.0f);
            UnityBridge.Instance.OverrideMousePosition(true, middle_of_screen);
        }
        else if (UpdateCount == 2)
        {
            IntegrationTest.Assert(_mouse_over.MouserOverPreviousFrame == false);
            IntegrationTest.Assert(_mouse_over.MouseOver == true);
        }
        else if (UpdateCount == 3)
        {
            Vector3 left_of_screen = new Vector3(Screen.width * 0.25f, Screen.height * 0.5f, 0.0f);
            UnityBridge.Instance.OverrideMousePosition(true, left_of_screen);
        }
        else if (UpdateCount == 4)
        {
            IntegrationTest.Assert(_mouse_over.MouserOverPreviousFrame == true);
            IntegrationTest.Assert(_mouse_over.MouseOver == false);

            Destroy(_card);

            IntegrationTest.Pass(gameObject);
        }

        UpdateCount++;
    }
Пример #28
0
        protected override IEnumerator runTest()
        {
            string payload = $"embeddedasseta?dl=bundle:mock-create-bundle&b=embedded_asset_test&x=.txt";

            ContentManifest.AssetEntry entry = ContentManifest.AssetEntry.Parse(payload);
            BundleManager bundleManager      = new BundleManager(null);
            DeviceManager deviceManager      = new DeviceManager();

            deviceManager.Mount(new BundleDevice(deviceManager, bundleManager));
            AssetRequest <TextAsset> requestA = deviceManager.LoadAsync <TextAsset>(entry.DeviceList, ref entry);
            AssetRequest <TextAsset> requestB = deviceManager.LoadAsync <TextAsset>(entry.DeviceList, ref entry);

            if (requestA == null || requestB == null)
            {
                IntegrationTest.Fail("requestA == null");
            }
            else
            {
                yield return(requestA);

                yield return(requestB);

                IntegrationTestEx.FailIf(requestA.Asset == null);
                IntegrationTestEx.FailIf(requestB.Asset == null);
                IntegrationTest.Pass();
            }
            bundleManager.UnmountAllBundles();
        }
Пример #29
0
        protected override IEnumerator runTest()
        {
            string payload = string.Format("{0}?dl=json:mock-json-res&x=txt", "Configuration/embedded_content_manifest");

            ContentManifest.AssetEntry entry = ContentManifest.AssetEntry.Parse(payload);
            DeviceManager manager            = new DeviceManager();

            manager.Mount(new MockJsonResourceDevice(manager));
            manager.Mount(new JsonDevice(manager));
            AssetRequest <ContentManifest> request = manager.LoadAsync <ContentManifest>(entry.DeviceList, ref entry);

            if (request == null)
            {
                IntegrationTest.Fail("request == null");
            }
            else
            {
                yield return(request);

                IntegrationTestEx.FailIf(!request.Finished);
                IntegrationTestEx.FailIf(request.Cancelled);
                IntegrationTestEx.FailIf(request.Asset == null);
                if (request.Asset == null)
                {
                }
            }
            IntegrationTest.Pass();
        }
Пример #30
0
        void Update()
        {
            _manager.Validate();

            //If we reach the end of the recording, we pass!
            if (!_provider.IsPlaying)
            {
                _provider.DestroyShapes();

                if ((allCallbacksRecieved & expectedCallbacks) == expectedCallbacks)
                {
                    IntegrationTest.Pass();
                    return;
                }

                Debug.LogError(getEnumMessage("Expected callbacks: " + expectedCallbacks, expectedCallbacks));
                Debug.LogError(getEnumMessage("Recieved callbacks: " + allCallbacksRecieved, allCallbacksRecieved));

                IntegrationTest.Fail("Could not find an interaction behaviour that recieved all expected callbacks");
            }
#if UNITY_EDITOR
            else
            {
                // Show Gizmos for InteractionBrushBone.
                InteractionBrushBone[] bb   = FindObjectsOfType(typeof(InteractionBrushBone)) as InteractionBrushBone[];
                GameObject[]           objs = new GameObject[bb.Length];
                for (int i = 0; i < bb.Length; i++)
                {
                    objs[i] = bb[i].gameObject;
                }
                Selection.objects = objs;
            }
#endif
        }