private void SaveChangeResaveAssets(AssetManager assetManager) { var simpleAsset = new SimpleAsset("Grandpa", new SimpleAsset("Pa", new SimpleAsset("Son", null))); assetManager.Save(simpleAsset); simpleAsset.Dble = 22.0; simpleAsset.Child.Dble = 42.0; assetManager.SaveSingle(simpleAsset); }
private void SaveAssetsAndDeleteAChild(AssetManager assetManager) { var simpleAsset = new SimpleAsset("Pa", new SimpleAsset("Son", null)); assetManager.Save(simpleAsset); var databaseFileProvider = (DatabaseFileProvider)VirtualFileSystem.ResolveProvider("/db", true).Provider; databaseFileProvider.AssetIndexMap.WaitPendingOperations(); ObjectId childId; databaseFileProvider.AssetIndexMap.TryGetValue("SimpleAssets/Son", out childId); VirtualFileSystem.FileDelete(FileOdbBackend.BuildUrl(VirtualFileSystem.ApplicationDatabasePath, childId)); }
private static void SaveSimpleAssets(AssetManager assetManager) { var simpleAsset = new SimpleAsset("Grandpa", new SimpleAsset("Pa", new SimpleAsset("Son", null))); assetManager.Save(simpleAsset); }