Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Added editor platform flag (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson authored Sep 16, 2019
1 parent 3b02262 commit 1e17880
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Submodules/SDK
Submodule SDK updated from 088e6b to b5f5a1
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,5 @@ public MixedRealityPose PoseData
}

#endregion Data Properties

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,37 @@ namespace XRTK.Definitions.Utilities
[Flags]
public enum SupportedPlatforms
{
WindowsStandalone = 1 << 0,
MacStandalone = 1 << 1,
LinuxStandalone = 1 << 2,
WindowsUniversal = 1 << 3,
Lumin = 1 << 4,
Android = 1 << 5,
iOS = 1 << 6
/// <summary>
/// Editor.
/// </summary>
Editor = 1 << 0,
/// <summary>
/// Windows Standalone platforms.
/// </summary>
WindowsStandalone = 1 << 1,
/// <summary>
/// Mac OSX standalone platforms.
/// </summary>
MacStandalone = 1 << 2,
/// <summary>
/// Linux standalone platforms.
/// </summary>
LinuxStandalone = 1 << 3,
/// <summary>
/// Windows UWP platforms.
/// </summary>
WindowsUniversal = 1 << 4,
/// <summary>
/// Magic Leap platform.
/// </summary>
Lumin = 1 << 5,
/// <summary>
/// Android mobile platforms
/// </summary>
Android = 1 << 6,
/// <summary>
/// Mac iOS mobile platforms.
/// </summary>
iOS = 1 << 7
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,10 @@ internal async Task TryRenderControllerModelAsync(Type controllerType, byte[] gl

if (!visualizationProfile.RenderMotionControllers) { return; }

GameObject controllerModel = null;
GltfObject gltfObject = null;

// If a specific controller template exists, check if it wants to override the global model, or use the system default specifically (in case global default is not used)
bool useSystemDefaultModels = visualizationProfile.GetControllerModelOverride(controllerType, ControllerHandedness, out controllerModel);
bool useSystemDefaultModels = visualizationProfile.GetControllerModelOverride(controllerType, ControllerHandedness, out var controllerModel);

// If an override is not configured for defaults and has no model, then use the system default check
if (!useSystemDefaultModels && controllerModel == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static bool IsPlatformSupported(this UnityEditor.BuildTarget editorBuildT

private static SupportedPlatforms GetSupportedPlatformMask(UnityEditor.BuildTarget editorBuildTarget)
{
SupportedPlatforms supportedPlatforms = 0;
var supportedPlatforms = SupportedPlatforms.Editor;

switch (editorBuildTarget)
{
Expand Down

0 comments on commit 1e17880

Please sign in to comment.