File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Assets/MRTK/Core/Utilities/Gltf/Serialization/Importers Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) Microsoft Corporation.
22// Licensed under the MIT License.
33
4+ using Microsoft . MixedReality . Toolkit . Utilities . Editor ;
45using Microsoft . MixedReality . Toolkit . Utilities . Gltf . Schema ;
56using System . IO ;
67using UnityEditor ;
@@ -16,6 +17,22 @@ namespace Microsoft.MixedReality.Toolkit.Utilities.Gltf.Serialization.Editor
1617{
1718 public static class GltfEditorImporter
1819 {
20+ #if MRTK_GLTF_IMPORTER_OFF
21+ [ MenuItem ( "Mixed Reality/Toolkit/Utilities/Enable MRTK glTF asset importer" ) ]
22+ #else
23+ [ MenuItem ( "Mixed Reality/Toolkit/Utilities/Disable MRTK glTF asset importer" ) ]
24+ #endif
25+ private static void ReconcileGltfImporterDefine ( )
26+ {
27+ BuildTargetGroup group = BuildPipeline . GetBuildTargetGroup ( EditorUserBuildSettings . activeBuildTarget ) ;
28+
29+ #if MRTK_GLTF_IMPORTER_OFF
30+ ScriptUtilities . RemoveScriptingDefinitions ( group , "MRTK_GLTF_IMPORTER_OFF" ) ;
31+ #else
32+ ScriptUtilities . AppendScriptingDefinitions ( group , "MRTK_GLTF_IMPORTER_OFF" ) ;
33+ #endif
34+ }
35+
1936 public static async void OnImportGltfAsset ( AssetImportContext context )
2037 {
2138 var importedObject = await GltfUtility . ImportGltfObjectFromPathAsync ( context . assetPath ) ;
You can’t perform that action at this time.
0 commit comments