From e6797029ad6e72f57d8e5823a1b8266e02a73d3a Mon Sep 17 00:00:00 2001 From: Matt Schoen Date: Fri, 21 Aug 2020 00:15:20 -0700 Subject: [PATCH] Fix build errors --- Runtime/Scripts/Data/FolderData.cs | 2 ++ Runtime/Scripts/Modules/HighlightModule/HighlightModule.cs | 5 ++++- .../Scripts/ListItems/InspectorComponentItem.cs | 7 +++++-- .../Scripts/ListItems/InspectorObjectFieldItem.cs | 5 ++++- .../Scripts/ListItems/InspectorUnimplementedItem.cs | 5 ++++- .../ProjectWorkspace/Scripts/AssetGridViewController.cs | 5 ++++- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Runtime/Scripts/Data/FolderData.cs b/Runtime/Scripts/Data/FolderData.cs index 77d26e359..20cc0b427 100644 --- a/Runtime/Scripts/Data/FolderData.cs +++ b/Runtime/Scripts/Data/FolderData.cs @@ -36,6 +36,7 @@ public FolderData(string name, int guid, int depth) m_Depth = depth; } +#if UNITY_EDITOR public static IEnumerator CreateRootFolderData(HashSet assetTypes, Action callback) { var hp = new HierarchyProperty(HierarchyType.Assets); @@ -126,5 +127,6 @@ static AssetData CreateAssetData(HierarchyProperty hp, HashSet assetType return new AssetData(hp.name, hp.guid, typeName); } +#endif } } diff --git a/Runtime/Scripts/Modules/HighlightModule/HighlightModule.cs b/Runtime/Scripts/Modules/HighlightModule/HighlightModule.cs index 2e2799ede..b9b6136dd 100644 --- a/Runtime/Scripts/Modules/HighlightModule/HighlightModule.cs +++ b/Runtime/Scripts/Modules/HighlightModule/HighlightModule.cs @@ -5,9 +5,12 @@ using Unity.EditorXR.Interfaces; using Unity.XRTools.ModuleLoader; using Unity.XRTools.Utils; +using UnityEngine; + +#if UNITY_EDITOR using UnityEditor; using UnityEditor.XRTools.Utils; -using UnityEngine; +#endif namespace Unity.EditorXR.Modules { diff --git a/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorComponentItem.cs b/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorComponentItem.cs index 5c1eade23..063358595 100644 --- a/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorComponentItem.cs +++ b/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorComponentItem.cs @@ -1,11 +1,14 @@ using TMPro; using Unity.EditorXR.Data; -using UnityEditor; -using UnityEditor.XRTools.Utils; using UnityEngine; using UnityEngine.UI; using Button = Unity.EditorXR.UI.Button; +#if UNITY_EDITOR +using UnityEditor; +using UnityEditor.XRTools.Utils; +#endif + namespace Unity.EditorXR.Workspaces { sealed class InspectorComponentItem : InspectorListItem diff --git a/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorObjectFieldItem.cs b/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorObjectFieldItem.cs index 83a3a9056..b180a3323 100644 --- a/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorObjectFieldItem.cs +++ b/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorObjectFieldItem.cs @@ -1,10 +1,13 @@ using System; using TMPro; using Unity.EditorXR.Data; -using UnityEditor.XRTools.Utils; using UnityEngine; using Object = UnityEngine.Object; +#if UNITY_EDITOR +using UnityEditor.XRTools.Utils; +#endif + namespace Unity.EditorXR.Workspaces { #if UNITY_EDITOR diff --git a/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorUnimplementedItem.cs b/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorUnimplementedItem.cs index ca00c1506..84e990d65 100644 --- a/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorUnimplementedItem.cs +++ b/Runtime/Workspaces/InspectorWorkspace/Scripts/ListItems/InspectorUnimplementedItem.cs @@ -1,8 +1,11 @@ using TMPro; using Unity.EditorXR.Data; -using UnityEditor.XRTools.Utils; using UnityEngine; +#if UNITY_EDITOR +using UnityEditor.XRTools.Utils; +#endif + namespace Unity.EditorXR.Workspaces { sealed class InspectorUnimplementedItem : InspectorPropertyItem diff --git a/Runtime/Workspaces/ProjectWorkspace/Scripts/AssetGridViewController.cs b/Runtime/Workspaces/ProjectWorkspace/Scripts/AssetGridViewController.cs index 6a64e2b98..79d11cd78 100644 --- a/Runtime/Workspaces/ProjectWorkspace/Scripts/AssetGridViewController.cs +++ b/Runtime/Workspaces/ProjectWorkspace/Scripts/AssetGridViewController.cs @@ -1,9 +1,12 @@ using System; using System.Collections.Generic; using Unity.EditorXR.Data; +using UnityEngine; + +#if UNITY_EDITOR using UnityEditor; using UnityEditor.XRTools.Utils; -using UnityEngine; +#endif namespace Unity.EditorXR.Workspaces {