docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Upgrading

    Unity Cloud Data-Streaming [1.5.0]

    To upgrade from the Unity Cloud Metadata package to the Unity Cloud Data-Streaming package 1.5.0, you must do the following:

    1. The Unity Cloud Metadata package is no longer required. You can remove it from your project.

    2. Replace the namespace Unity.Cloud.Metadata by Unity.Cloud.DataStreaming.Metadata.

    3. Replace the namespace Unity.Cloud.Metadata.AssetManager by Unity.Cloud.DataStreaming.Runtime.AssetManager when initializing a IMetadataRepository instance.

    4. IMetadataRepository.Query returns a IMetadataQuery interface instead of a MetadataQuery instance.

    IMetadataQuery query = metadataRepository.Query();
    
    1. MetadataContainer, MetadataArray, MetadataObject, and MetadataValue have been replaced by IReadOnlyDictionary<string, IMetadataValue>.
    IMetadataQuery query = metadataRepository.Query();
    MetadataInstance instance = await query.GetFirstOrDefaultAsync(token);
    
    IReadOnlyDictionary<string, IMetadataValue> properties = instance.Properties;
    IMetadataValue value = properties["keyA"];
    string asText = value.ToString();
    double asNumber = value.ToNumber();
    
    1. IMetadataQuery.Select accepts MetadataPathCollection or IEnumerable<string> as input.
    IMetadataQuery query = metadataRepository
        .Query("keyA", "keyB", "keyC")
        .Select(paths);
    

    Unity Cloud Metadata [0.9.2]

    To upgrade to the Unity Cloud Metadata package 0.9.2, you must do the following:

    1. To query only the ids, without the metadata fields and geometric data, you need to use the OptionalData.
    IMetadataQuery query = metadataRepository
        .Query()
        .Select(MetadataPathCollection.None, new OptionalData(OptionalData.Fields.Id));
    

    Unity Cloud Metadata [0.9.0]

    To upgrade to the Unity Cloud Metadata package 0.9.0, you must do the following:

    1. Instead of instantiating a MetadataRepository, initialize a IMetadataRepository instance via the MetadataRepositoryFactory.
    var factory = new MetadataRepositoryFactory();
    IMetadataRepository metadataRepository = factory.Create(dataset, serviceHttpClient, serviceHostResolver);
    

    Unity Cloud Metadata [0.8.0]

    To upgrade to the Unity Cloud Metadata package 0.8.0, you must do the following:

    1. To get the possible root keys, replace IMetadataRepository.GetAllKeysAsync by IMetadataRepository.GetAllPathsAsync. It will return a MetadataPathCollection instance instead of an IEnumerable<string>.
    IMetadataRepository metadataRepository = new MetadataRepository(serviceHttpClient, serviceHostResolver, projectId, assetId, datasetId);
    MetadataPathCollection result = await metadataRepository.GetAllPathsAsync();
    
    1. IMetadataRepository.Query returns a MetadataQuery which implements IAsyncEnumerable<MetadataInstance> instead of returning a MatchCollection.
    MetadataQuery query = metadataRepository.Query();
    
    await foreach (MetadataInstance metadataInstance in query)
    {
        // Process metadataInstance
    }
    
    1. MetadataQuery.Select requires a MetadataPathCollection instead of an IEnumerable<string>.
    var paths = new MetadataPathCollection("keyA", "keyB", "keyC");
    
    MetadataQuery query = metadataRepository
        .Query()
        .Select(paths);
    
    1. SelectAll has been replaced by the Select method.
    MetadataQuery query = metadataRepository
        .Query()
        .Select(MetadataPathCollection.All); 
    
    1. SelectOnlyId has been replaced by the Select method.
    MetadataQuery query = metadataRepository
        .Query()
        .Select(MetadataPathCollection.None);
    
    1. IncludedIn has been replaced by the WhereInstanceEquals method.
    MetadataQuery query = metadataRepository
        .Query()
        .WhereInstanceEquals(instanceIdA, instanceIdB);
    
    1. LimitTo has been removed. You can control it when enumerating the AsyncEnumerable.
    MetadataQuery query = metadataRepository.Query();
    
    var count = 0;
    await foreach (MetadataInstance metadataInstance in query)
    {
        if (count++ >= 200)
            break;
    }
    

    Unity Cloud Metadata [0.6.0]

    To upgrade to the Unity Cloud Metadata package 0.6.0, you must do the following:

    1. Instead of initializing a MetadataRepository, instantiate a MetadataRepository.
    var metadataRepository = new MetadataRepository(serviceHttpClient, serviceHostResolver, projectId, assetId, datasetId);
    
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)