You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
781 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace IllusionInjector.Utilities
  7. {
  8. public static class SteamCheck
  9. {
  10. public static Type SteamVRCamera;
  11. public static Type SteamVRExternalCamera;
  12. public static Type SteamVRFade;
  13. public static bool IsAvailable => FindSteamVRAsset();
  14. private static bool FindSteamVRAsset()
  15. {
  16. SteamVRCamera = Type.GetType("SteamVR_Camera", false);
  17. SteamVRExternalCamera = Type.GetType("SteamVR_ExternalCamera", false);
  18. SteamVRFade = Type.GetType("SteamVR_Fade", false);
  19. return SteamVRCamera != null && SteamVRExternalCamera != null && SteamVRFade != null;
  20. }
  21. }
  22. }