1. Breaking Changes

1.1 Support runtime version was updated to .NET 4.x

1.2 Package build version was updated to Unity2019.4.31

1.3 Namespace changes

1.4 Encryption passwords for models

using Pixiv.VroidSdk.Api.Legacy;
using Pixiv.VroidSdk.Api.DataModel;

private void LoadModel(CharacterModel characterModel, string password)
{
		HubModelDeserializer.Instance.LoadCharacterAsync(
		    characterModel: characterModel,
        encryptPassword: password, // Set an encryption password for the model
		    onLoadComplete: (GameObject characterObj) => onSuccess(characterObject),
		    onDownloadProgress: (float progress) => onProgress(progress),
		    onError: (Exception error) => onError(error)
		);

		// You can use Option to set the number of caches and other details
    // However, a password is required
		var option = new HubModelDeserializerOption {
				MaxCacheCount = 20,
        CacheEncryptPassword = password, // Set an encryption password for the model
		};
		HubModelDeserializer.Instance.LoadCharacterAsync(
		    characterModel: characterModel,
				option: option,
		    onLoadComplete: (GameObject characterObj) => onSuccess(characterObject),
		    onDownloadProgress: (float progress) => onProgress(progress),
		    onError: (Exception error) => onError(error)
		);
}

1.5 All DataModel has been unified to a reference type

using Pixiv.VroidSdk.Api.DataModel;

public class Model : ApplicationModel
{
		 // Class declarations are now reference types, so they can't be declared as nullable types
-    public Account? CurrentUser { get; set; }
+    public Account CurrentUser { get; set; }

    public Model()
    {
        CurrentUser = null;
    }
}

1.6 Deprecation of LocalStorage and changes in cache format

1.7 GltfMaterial#extensions in property API response changed from Dictionary to GltfMaterialExtensions

public override void Init(GltfMaterial baseData)
{
    if (baseData.extensions != null)
    {
        stringBuilder.Append("\\n");
        // v0.0.x returns the Dictionary
        foreach (var x in baseData.extensions)
        {
            stringBuilder.AppendLine("\\t" + x.Key + ":" + x.Value);
        }
    }
}
public override void Init(GltfMaterial baseData)
{
    if (baseData.extensions != null)
    {
        stringBuilder.Append("\\n");
        // After v0.1.0, it returns GltfMaterialExtensions type and determines if KHR_materials_unlit exists
        if (baseData.extensions.KHR_materials_unlit != null)
        {
            stringBuilder.AppendLine("\\t KHR_materials_unlit:{}");
        }
    }
}

1.8 HubApi and HubModelDeserializer initialization

class Hoge : MonoBehaviour
{
    void Start()
    {
			HubApi.GetAccountCharacterModels(
			    count: 10,
			    onSuccess: (List<CharacterModel> characterModels) => {
							HubModelDeserializer.Instance.LoadCharacterAsync(
							    characterModel: characterModels[0],
							    onDownloadProgress: (float progress) => {
							    },
							    onLoadComplete: (GameObject characterObj) => {
											characterObj.transform.parent = this.transform;
							    },
							    onError: (Exception error) => {
							    }
							);
					},
			    onError: (ApiErrorFormat errorFormat) => { /* When an error occurs (e.g. communication error) */ }
			);
    }
}

2. Deprecated features

2.1 The old interface has been deprecated

The following classes have been deprecated. There are alternatives to each of these, so please consider switching to them.

Authorizations

API usage

Model loader

2.2 SDKConfiguration deprecation

To set the previous SDK, you had to enter the application ID and Secret in the SDKConfiguration, but this is deprecated starting from 0.1.0.

Instead, please download and use the file credential.json.bytes from the application management page.

3. New Features

3.1 Implementing a new interface for authorization, API execution, and model loading

3.2 Added the ability to switch the back and for communication

3.3 Implementation of Loopback interface redirect

4. Changes

4.1 Third-party libraries have been replaced

4.2 UniVRM was updated to v0.89.0

5. Bug fix

5.1 Fixed a bug that caused an error around the URL scheme when authenticating on iOS