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

MixedRealitySceneSystemProfile Content Scenes has only {get} method in latest version --- MRTK 2.7.3 #10480

Closed SWARAVL closed 9 months ago

SWARAVL commented 2 years ago

Overview

MixedRealitySceneSystemProfile Content Scenes has only {get} method in latest version --- MRTK 2.7.3 but, MRTK 2.5.3 had both {get; set;} methods where we could add the content scenes at runtime.

Note: We cannot find any proper documentation for MRTK 2.7.3 https://docs.microsoft.com/en-us/dotnet/api/microsoft.mixedreality.toolkit.scenesystem.mixedrealityscenesystemprofile.contentscenes?view=mixed-reality-toolkit-unity-2020-dotnet-2.7.0

For Unity 2020, the max MRTK version document that we get is 2.7.0

Expected behavior

We would like to have the {set;} method in 2.7.3 as well as we are facing issues while migrating our MRTK version from 2.5.3 to 2.7.3

Actual behavior

With MRTK 2.7.3, we get the below error: Property or indexer 'MixedRealitySceneSystemProfile.ContentScenes' cannot be assigned to -- it is read only

Steps to reproduce

MixedRealitySceneSystemProfile mixedRealitySceneSystemProfile = _profile.SceneSystemProfile; List sceneInfos = new List(); mixedRealitySceneSystemProfile.ContentScenes = sceneInfos;

When we use the above lines of code snippet in MRTK 2.5.3, it works fine as the ContentScenes has both {get;set;} methods. But, when we try the same with upgrading our MRTK 2.7.3, we face the error : Property or indexer 'MixedRealitySceneSystemProfile.ContentScenes' cannot be assigned to -- it is read only

Unity editor version

2020.3.25f1

Mixed Reality Toolkit release version

2.7.3

MaxWang-MS commented 2 years ago

Hi @SWARAVL, I looked at MixedRealitySceneSystemProfile.cs in the releases/2.5.3 branch but did not see a setter there. Maybe you were using a modified MRTK 2.5.3 where the setter was manually added? https://github.com/microsoft/MixedRealityToolkit-Unity/blob/b6bc5b702715add6076e7a9d4fa2e88a5ffa01b1/Assets/MRTK/Core/Definitions/SceneSystem/MixedRealitySceneSystemProfile.cs#L46 Also, we are not publishing API reference docs for patch versions as the API signatures, etc. are expected to be the same.

SWARAVL commented 2 years ago

Ok, so is there any other alternative approach which we could use for dynamically adding content scenes ?

david-c-kline commented 2 years ago

@SWARAVL, There is no mechanism currently, though one could be added (recommend a set of AddScene and RemoveScene methods).

Are you interested in contributing?

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!