Esempio n. 1
0
        public void Init()
        {
            CompactHierarchyManager.Clear();
            BrushMeshFactory.CreateBox(Vector3.one, 0, out var brushMesh);
            var surfaceDefinition = new ChiselSurfaceDefinition();

            surfaceDefinition.EnsureSize(6);
            var brushMeshHash = BrushMeshManager.RegisterBrushMesh(brushMesh, surfaceDefinition);

            dummyBrushMeshInstance = new BrushMeshInstance {
                brushMeshHash = brushMeshHash
            };
        }
Esempio n. 2
0
        public IEnumerator CreateBrushContainerAsset_IsPartOfManager()
        {
            var surfaceDefinition = new ChiselSurfaceDefinition();

            surfaceDefinition.EnsureSize(6);

            BrushMeshFactory.CreateBox(Vector3.one, 0, out BrushMesh box);
            yield return(null);

            var instance = BrushMeshInstance.Create(box, in surfaceDefinition);

            Assert.IsTrue(instance.Valid);
            instance.Destroy();
        }