Mixed Reality Toolkit
In a "New" Unity project (using Unity defaults), on importing the Mixed Reality Toolkit, an error is raised on the EnforceEditorSettings script preventing the project from running.
Assets/MRTK/MixedRealityToolkit/_Core/Utilities/Editor/Setup/EnforceEditorSettings.cs(202,45): error CS1644: Feature `interpolated strings' cannot be used because it is not part of the C# 4.0 language specification
Assets/MRTK/MixedRealityToolkit/_Core/Utilities/Editor/Setup/EnforceEditorSettings.cs(27,28): error CS0117: `string' does not contain a definition for `IsNullOrWhiteSpace'
Assets/MRTK/MixedRealityToolkit/_Core/Extensions/EditorClassExtensions/ScriptableObjectExtensions.cs(24,58): error CS1644: Feature `interpolated strings' cannot be used because it is not part of the C# 4.0 language specification
The MRTK should import and run the "EnforceEditorSettings" without error.
The opposite. Nothing runs
2018.2.13f0
Development
I don't think this is an issue we can "FIX" in the code. But we need a plan / process to inform users how to import the project without error.
Pretty sure this is something we've always known about and there is no way to mitigate this. And we document this in the getting started.
Good news is unity is making the .net 4.x equivalent the default in 2018.3+
While is it correct that:
A: This will be fixed in the future
B: This is a known problem within the MRTK team
We need to ensure we have a mitigation plan for when new users try the project. Be it:
But if a new user imports the project as it stands into a brand new project, the first thing they will see are errors. Which is not a good "First experience"
Personally, if a new asset throws lots of errors at me after importing, I then quickly delete it and don't touch it again :D
Indeed. Big warning text is good.
One possibility we can do. Is put the EnsureSettings.cs into an assembly and ship it. Assemblies always run. (But I'm fairly certain we're trying to ship binaries anyway. idk)
Also, I'm not sure it should be tagged as a Bug since we already knew this was a setup requirement.
I'm going to do a @davidkline-ms (sorry) and say where is that documented?
It's not on the home page or any of our guides yet :D
Seems like the getting started doc is gone. But I'm pretty sure I added it someplace. Seems to be gone now.
Okay so the best way to fix this is to replace the Assets\MixedRealityToolkit\_Core\Utilities\Editor folder with the compiled as a .net 3.5 DLL so that users correctly get the prompt to switch to the 4.x equivalent.
Agreed, I've tested that approach and it automatically fires before the Toolkit is even finished loading (as Unity have stated, compiled DLL's are loaded and run FIRST)
This prevents the user landing in Unity with an unworking project with uncompiled code and loads of warnings, as is found now (as indicated in this issue.)
PR #2993 looks to address this I believe.
Most helpful comment
While is it correct that:
A: This will be fixed in the future
B: This is a known problem within the MRTK team
We need to ensure we have a mitigation plan for when new users try the project. Be it:
But if a new user imports the project as it stands into a brand new project, the first thing they will see are errors. Which is not a good "First experience"
Personally, if a new asset throws lots of errors at me after importing, I then quickly delete it and don't touch it again :D