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 TMPro; | |
using Sirenix.OdinInspector; | |
/// <summary> | |
/// An extension of TextMeshPro that causes the text to be displayed in a | |
/// circular arc. | |
/// | |
/// Adapted from https://github.com/TonyViT/CurvedTextMeshPro and improved. | |
/// TonyViT's version has some unnecessary properties and doesn't use the |
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 SwingingArmMotion : MonoBehaviour | |
{ | |
// Game Objects | |
[SerializeField] private GameObject LeftHand; | |
[SerializeField] private GameObject RightHand; | |
[SerializeField] private GameObject MainCamera; |
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.Events; | |
public static class MonoExtensions | |
{ | |
public static Coroutine Wait(this MonoBehaviour mono, float delay, UnityAction action) | |
{ | |
return mono.StartCoroutine(ExecuteAction(delay, action)); | |
} |
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
/* | |
Copyright 20XX, sysdia.com & GPepos | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | |
documentation files (the "Software"), to deal in the Software without restriction, including without | |
limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: |
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 UnityEngine.XR; | |
using UnityEngine.XR.Management; | |
public class XRSubSystemTest : MonoBehaviour | |
{ | |
public void Start() | |
{ | |
var xrSettings = XRGeneralSettings.Instance; | |
if (xrSettings == null) |
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.Diagnostics.CodeAnalysis; | |
using UnityEngine; | |
// Dont forget to add "using RDG;" to the top of your script! | |
namespace RDG | |
{ | |
/// <summary> | |
/// Class for controlling Vibration. Automatically initializes before scene is loaded. | |
/// </summary> | |
public static class Vibration |
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
Shader "Name" { | |
Properties { | |
_Name ("display name", Range (min, max)) = number | |
_Name ("display name", Float) = number | |
_Name ("display name", Int) = number | |
_Name ("display name", Color) = (number,number,number,number) | |
_Name ("display name", Vector) = (number,number,number,number) |
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; | |
public static class Vibration | |
{ | |
#if UNITY_ANDROID && !UNITY_EDITOR | |
public static AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
public static AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); | |
public static AndroidJavaObject vibrator = currentActivity.Call<AndroidJavaObject>("getSystemService", "vibrator"); |