Skip to content

Commit

Permalink
fix(SDK): exclude BuildTargetGroup outside Unity Editor
Browse files Browse the repository at this point in the history
BuildTargetGroup is defined in `UnityEditor` namespace, exclude the
declaration of `excludeTargetGroups` in `VRTK_SDKManager` if not in
Unity Editor.
  • Loading branch information
gpvigano committed Nov 15, 2017
1 parent c7a696a commit 1854d9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Assets/VRTK/Source/Scripts/Utilities/SDK/VRTK_SDKManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ public static VRTK_SDKManager instance
public bool autoLoadSetup = true;
[Tooltip("The list of SDK Setups to choose from.")]
public VRTK_SDKSetup[] setups = new VRTK_SDKSetup[0];
#if UNITY_EDITOR
[Tooltip("The list of Build Target Groups to exclude.")]
public BuildTargetGroup[] excludeTargetGroups = new BuildTargetGroup[] {
#if UNITY_2017_1_OR_NEWER
BuildTargetGroup.Switch,
BuildTargetGroup.Facebook
#endif
};
#endif

/// <summary>
/// The loaded SDK Setup. `null` if no setup is currently loaded.
Expand Down Expand Up @@ -216,8 +218,9 @@ public VRTK_SDKSetup loadedSetup
private Coroutine checkLeftControllerReadyRoutine = null;
private Coroutine checkRightControllerReadyRoutine = null;
private float checkControllerReadyDelay = 1f;
#if UNITY_EDITOR
private BuildTargetGroup[] targetGroupsToExclude;

#endif
/// <summary>
/// The event invoked whenever the loaded SDK Setup changes.
/// </summary>
Expand Down

0 comments on commit 1854d9b

Please sign in to comment.