public void Upgrade(int currentVersion, int targetVersion, ILogger log, YamlMappingNode yamlAssetNode) { dynamic asset = new DynamicYamlMapping(yamlAssetNode); asset.SerializedVersion = AssetRegistry.GetCurrentFormatVersion(typeof(MyUpgradedAsset)); // Move Test1 to Test2 asset.Test2 = asset.Test1; asset.Test1 = DynamicYamlEmpty.Default; }
public void Upgrade(AssetMigrationContext context, int currentVersion, int targetVersion, YamlMappingNode yamlAssetNode, PackageLoadingAssetFile assetFile) { dynamic asset = new DynamicYamlMapping(yamlAssetNode); asset.SerializedVersion = AssetRegistry.GetCurrentFormatVersion(typeof(MyUpgradedAsset)); // Move Test1 to Test2 asset.Test2 = asset.Test1; asset.Test1 = DynamicYamlEmpty.Default; }