Skip to content

Commit 72cc3aa

Browse files
committed
fix(SDK): let SDKManager work with Unity versions prior to 2017.1
Add a check in `VRTK_SDKManager` on Unity version when initializing `excludeTargetGroups` to avoid the error `'UnityEditor.BuildTargetGroup' does not contain a definition for 'Switch'`.
1 parent a82195f commit 72cc3aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Assets/VRTK/Source/Scripts/Utilities/SDK/VRTK_SDKManager.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,12 @@ public static VRTK_SDKManager instance
181181
[Tooltip("The list of SDK Setups to choose from.")]
182182
public VRTK_SDKSetup[] setups = new VRTK_SDKSetup[0];
183183
[Tooltip("The list of Build Target Groups to exclude.")]
184-
public BuildTargetGroup[] excludeTargetGroups = new BuildTargetGroup[] { BuildTargetGroup.Switch, BuildTargetGroup.Facebook };
184+
public BuildTargetGroup[] excludeTargetGroups = new BuildTargetGroup[] {
185+
#if UNITY_2017_1_OR_NEWER
186+
BuildTargetGroup.Switch,
187+
BuildTargetGroup.Facebook
188+
#endif
189+
};
185190

186191
/// <summary>
187192
/// The loaded SDK Setup. `null` if no setup is currently loaded.

0 commit comments

Comments
 (0)