MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Latest MRTK-Development doesn't compile in Unity

Open dapt1989 opened this issue 7 years ago • 12 comments

Overview

Unity doesn't compile with the current implementation on MRTK-Development

Expected Behavior

Unity should compile and build for both il2cpp and .NET

Actual Behavior

The commit below does not work, but there is a commit that will compile and build mrtk_development: 580c7a8a2d29ce417fc0838e4e78c61ccd502bd7

Steps to reproduce

Open Unity Compile project and look at the console

MRTK-Development

Unity Editor Version

Unity 2018.3.1f1

Mixed Reality Toolkit Release Version

mrtk_development commit: 90941f812eb07d828db06a9f2fdd0bf306716182

dapt1989 avatar Mar 25 '19 22:03 dapt1989

@dapt1989 what's the build configuration this did not build with? (Platform, backend)

Alexees avatar Mar 26 '19 10:03 Alexees

The error is happening before the build process starts. The unity project as a whole doesn't compile trying to access the MRTK addon, which blocks the project from being able to build. The project is still using a .NET backend and below is the Unity Build Settings window.

BuildSettingsForError

The errors that Unity flags for this bug and #3688 are different so it looks like some issues were solved and new ones appeared thus the reason I created separate bugs, but I apologize if that duplicate complicates things.

dapt1989 avatar Mar 26 '19 17:03 dapt1989

@dapt1989, can you try a newer release of Unity 2018.3? I believe there were some API changes in recent patches (.3, if my memory serves me) that prevent using 2018.3.1.

Thanks!

david-c-kline avatar Mar 26 '19 18:03 david-c-kline

Just verified that this and one other script - InspectorGenericFields.cs - are blocking .NET compilation in Unity 2018.3.3. Working on a PR now.

Railboy avatar Mar 26 '19 18:03 Railboy

I am able to run with MRTK in editor now, but I am getting errors around glb and gltf importing.

Scripted importers UnityGLTF.GLTFImporter and Microsoft.MixedReality.Toolkit.Utilities.Gltf.Serialization.Editor.GlbAssetImporter are targeting the glb extension, rejecting both. UnityEditor.Experimental.AssetImporters.ScriptedImporter:RegisterScriptedImporters()

and

Scripted importers Microsoft.MixedReality.Toolkit.Utilities.Gltf.Serialization.Editor.GlbAssetImporter and Microsoft.MixedReality.Toolkit.Utilities.Gltf.Serialization.Editor.GltfAssetImporter are targeting the gltf extension, rejecting both. UnityEditor.Experimental.AssetImporters.ScriptedImporter:RegisterScriptedImporters()

It looks like unity can't register the importers not sure what could cause this.

dapt1989 avatar Mar 27 '19 00:03 dapt1989

@dapt1989 Let's open a separate issue for the GLTF service problem.

Railboy avatar Mar 27 '19 16:03 Railboy

Does anyone have a preference on whether or not the MRTK should come with a default importer? A workaround here is to remove the MRTK GlbAssetImporter and GltfAssetImporter. But we will then lose any ability for users to import gltf/glb files that aren't using UnityGLTF. Long term, i think we will move towards consuming UnityGLTF, but in the immediate, what seems preferred?

chrisfromwork avatar Apr 09 '19 19:04 chrisfromwork

Closing as we will track the GLTF issue in a separate issue.

Yoyozilla avatar Apr 23 '19 23:04 Yoyozilla

@Yoyozilla could you link here the other issue? I have this problem and I didn't find the related issue

salvolannister avatar Mar 22 '22 14:03 salvolannister

could you link here the other issue? I have this problem and I didn't find the related issue

@salvolannister The glTF importer? I'm not sure if we opened one at that time, but https://github.com/microsoft/MixedRealityToolkit-Unity/issues/9653 was opened later. I added a menu item in https://github.com/microsoft/MixedRealityToolkit-Unity/pull/9658#issuecomment-819778789 to turn our importer off, if needed.

keveleigh avatar Mar 22 '22 18:03 keveleigh

Yes I was talking about glTF importer! Thank you for the help, I solved reading #9658

salvolannister avatar Mar 30 '22 14:03 salvolannister

Yes I was talking about glTF importer! Thank you for the help, I solved reading #9658

Excellent! Glad to hear you were able to resolve the issue.

keveleigh avatar Mar 30 '22 15:03 keveleigh