Beispiel #1
0
    public void ClearCache()
    {
                #if UNITY_EDITOR
        AssetWriter.DeleteAsset(CacheAssetPath + "/PositionData");
        AssetWriter.DeleteAsset(CacheAssetPath + "/ColourData");
        AssetWriter.DeleteAsset(CacheAssetPath + "/DumbTriangleMesh");
        Blocks.Clear();

        var mf = GetComponent <MeshFilter>();
        if (mf)
        {
            mf.sharedMesh = null;
        }
                #else
        throw new System.Exception("SaveCache only for editor");
                #endif
    }