This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RotateAxisOnCompass : MonoBehavior | |
{ | |
enum Axis { x, y, z } | |
[SerializeField] private Axis rotateAxis; | |
[SerializeField] private float compassSmooth; | |
private float lastMagneticHeading; | |
private void Start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
/// <see>https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-messagebox</see> | |
public static class NativeWinAlert | |
{ | |
[System.Runtime.InteropServices.DllImport("user32.dll")] | |
private static extern System.IntPtr GetActiveWindow(); | |
public static System.IntPtr GetWindowHandle() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
using UnityEngine.UI; //required for Input.compass | |
public float compassSmooth = 0.5f; | |
private float m_lastMagneticHeading = 0f; | |
public class CompassController : MonoBehaviour { | |
// Use this for initialization | |
void Start () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
using UnityEngine.VR; | |
using VRStandardAssets.Utils; | |
public class VrModeSwitch : MonoBehaviour | |
{ | |
// REFERENCE | |
[SerializeField] private GyroCamera _gyroControl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System; | |
using System.Collections.Generic; | |
public class GravityCamera : MonoBehaviour | |
{ | |
public GameObject target; | |
public Vector3 centerOffset; | |
public float sensitivity = 1000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System; | |
using System.Text; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Threading; | |
public class UDP_GyroSend : MonoBehaviour { |