microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Add versioning to MRTK custom assets #6681

Closed david-c-kline closed 1 year ago

david-c-kline commented 4 years ago

This issue has been migrated a new MRTK repository, and the status of this issue will now be tracked at the following location:


Based on #6650 and several related discussions, MRTK should implement asset versioning for profiles and other custom scriptable objects.

From @julenka,

we would do something like:

    private const int CurrentVersion = 2;

    [SerializeField]
    [HideInInspector]
    private int version = CurrentVersion;

    private void PerformVersionPatching()
    {
        if (version == 0)
        {
            // Migrate from version 0 to 1.
            ...
        }

        if (version <= 1)
        {
            // Migrate from version 1 to 2.
            ...
        }

        version = CurrentVersion;
    }
wiwei commented 4 years ago

Note that this is related to:

https://github.com/microsoft/MixedRealityToolkit-Unity/pull/6650

There's a little more to consider here, and this issue is a specific solution to a problem that we could consider

david-c-kline commented 2 years ago

Adding MRTK3 tag to ensure we keep scriptable object versioning in mind.