Beispiel #1
0
        public IEnumerator CreateBrushMeshAsset_IsPartOfManager()
        {
            var newBrushMeshAsset = ScriptableObject.CreateInstance <CSGBrushMeshAsset>();

            yield return(null);

            CSGBrushMeshAssetManager.Update();

            //Assert.False(CSGBrushMeshAssetManager.IsInUpdateQueue(newBrushMeshAsset)); // should already be done
            Assert.True(CSGBrushMeshAssetManager.IsRegistered(newBrushMeshAsset));
            UnityEngine.Object.DestroyImmediate(newBrushMeshAsset);
        }
Beispiel #2
0
        public IEnumerator CreateBrushMeshAsset_SetDirty_IsDirty()
        {
            var newBrushMeshAsset = ScriptableObject.CreateInstance <CSGBrushMeshAsset>();

            yield return(null);

            CSGBrushMeshAssetManager.Update();

            //Assert.False(CSGBrushMeshAssetManager.IsInUpdateQueue(newBrushMeshAsset));
            //Assert.False(CSGBrushMeshAssetManager.IsInUnregisterQueue(newBrushMeshAsset));
            Assert.True(CSGBrushMeshAssetManager.IsRegistered(newBrushMeshAsset));
            CSGBrushMeshAssetManager.SetDirty(newBrushMeshAsset);
            //Assert.True(CSGBrushMeshAssetManager.IsInUpdateQueue(newBrushMeshAsset));
            Assert.True(CSGBrushMeshAssetManager.IsDirty(newBrushMeshAsset));

            UnityEngine.Object.DestroyImmediate(newBrushMeshAsset);
        }