MixedRealityToolkit / MixedRealityToolkit-Unity

This repository holds the third generation of the Mixed Reality Toolkit for Unity. The latest version of the MRTK can be found here.
BSD 3-Clause "New" or "Revised" License
378 stars 97 forks source link

Add versioning to MRTK custom assets #317

Open IssueSyncBot opened 1 year ago

IssueSyncBot commented 1 year ago

Original issue opened by:

@david-c-kline @david-c-kline


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;
    }

ISSUE MIGRATION

Issue migrated from: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/6681

IssueSyncBot commented 1 year ago

Original comment by:

@wiwei wiwei


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

IssueSyncBot commented 1 year ago

Original comment by:

@david-c-kline david-c-kline


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