Skip to content

Commit

Permalink
Suppress obsolete warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mtschoen committed Aug 19, 2020
1 parent c09324a commit a30c27d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Runtime/Scripts/Core/Contexts/EditingContextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ static bool ShouldShowEditorXR()
if (EditorApplication.isPlayingOrWillChangePlaymode || Application.isPlaying)
return false;

#pragma warning disable 618
return PlayerSettings.GetVirtualRealitySupported(BuildTargetGroup.Standalone);
#pragma warning restore 618
}

[SettingsProvider]
Expand Down
2 changes: 2 additions & 0 deletions Runtime/Scripts/Core/EditorXR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ static void HandleInitialization()
s_IsInitialized = true;

#if UNITY_EDITOR
#pragma warning disable 618
if (!PlayerSettings.GetVirtualRealitySupported(BuildTargetGroup.Standalone))
Debug.Log("<color=orange>EditorXR requires VR support. Please check Virtual Reality Supported in Edit->Project Settings->Player->XR Settings</color>");
#pragma warning restore 618
#endif
}
}
Expand Down
4 changes: 4 additions & 0 deletions Runtime/Scripts/Core/VRView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ public static Vector3 headCenteredOrigin
{
get
{
#pragma warning disable 618
return XRDevice.GetTrackingSpaceType() == TrackingSpaceType.Stationary ? Vector3.up * HeadHeight : Vector3.zero;
#pragma warning restore 618
}
}

Expand Down Expand Up @@ -502,7 +504,9 @@ void UpdateHMDStatus()

internal static bool GetIsUserPresent()
{
#pragma warning disable 618
return XRDevice.userPresence == UserPresenceState.Present;
#pragma warning restore 618
}

void SetGameViewsAutoRepaint(bool enabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ static class UsesDeviceTypeMethods
/// <returns>The device type</returns>
public static DeviceType GetDeviceType(this IUsesDeviceType @this)
{
#pragma warning disable 618
if (string.IsNullOrEmpty(s_XRDeviceModel))
s_XRDeviceModel = XRDevice.model;
#pragma warning restore 618

return s_XRDeviceModel.IndexOf("oculus", StringComparison.OrdinalIgnoreCase) >= 0
? DeviceType.Oculus : DeviceType.Vive;
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Scripts/Modules/ActionsModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void ConnectInterface(object target, object userData = null)
var actionsMenu = target as IActionsMenu;
if (actionsMenu != null)
{
actionsMenu.menuActions = menuActions;
actionsMenu.menuActions = menuActions;
m_ActionsMenus.Add(actionsMenu);
}
}
Expand Down
2 changes: 2 additions & 0 deletions Runtime/Scripts/Proxies/Vive/ViveProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ sealed class ViveProxy : TwoHandedProxyBase

protected override void Awake()
{
#pragma warning disable 618
m_IsOculus = XRDevice.model.IndexOf("oculus", StringComparison.OrdinalIgnoreCase) >= 0;
#pragma warning restore 618

if (m_IsOculus)
{
Expand Down
2 changes: 1 addition & 1 deletion Runtime/libs/input-prototype

0 comments on commit a30c27d

Please sign in to comment.