Unity 6.+ migration guide

Upgrading version

Increase the dependency version in your Packages/manifest.json file to upgrade your Qonversion SDK to the latest

"com.qonversion.unity": "https://github.com/qonversion/unity-sdk.git#6.0.0"


In this major version, we have renamed several entities and public methods to make our namings more clear. To make everything work just change all the occurrences from the left column of the table below to the new ones.

Before upgradeAfter upgrade

User properties changes

As mentioned above, we have renamed theUserProperty enum to UserPropertyKey. It was made to release the name UserProperty for a class, containing both the property key and its value. This class will be used in the new Qonversion method userProperties, which will return all the properties set for the current user.

Qonversion.GetSharedInstance().UserProperties((userProperties, error) =>
    if (error != null)
        // Handle the error  
        Debug.LogError("Error" + error);   
        userProperties.Properties.ForEach(userProperty => {
            Debug.Log("User property - key: " + userProperty.Key + ", value: " + userProperty.Value);

UserProperties class returned as the successful result of userProperties contains several useful fields and methods to get all the types of properties you may want:

PropertiesList of all user properties
DefinedPropertiesSubset of all user properties, which were set using Qonversion-defined keys
CustomPropertiesSubset of all user properties, which were set using custom keys
FlatPropertiesMapA flattened version of all user properties as a key-value map
FlatDefinedPropertiesMapA flattened version of defined user properties as a key-value map
FlatCustomPropertiesMapA flattened version of custom user properties as a key-value map
GetPropertykey - stringSearches for a property with the given property key in all properties list
GetDefinedPropertykey - UserPropertyKeySearches for a property with the given Qonversion-defined property key in the defined properties list.

The last change here is that we've enriched UserPropertyKey enum with a Custom key to represent all the custom properties.