This file contains 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
/*Please do support www.bitshiftprogrammer.com by joining the facebook page : fb.com/BitshiftProgrammer | |
Legal Stuff: | |
This code is free to use no restrictions but attribution would be appreciated. | |
Any damage caused either partly or completly due to usage this stuff is not my responsibility*/ | |
Shader "BitshiftProgrammer/Billboard" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture Image", 2D) = "white" {} | |
_Scaling("Scaling", Float) = 1.0 |
This file contains 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; | |
public class ThisPlatform { | |
// This property allows you to use ThisPlatform.IsIphoneX to determine if you should do anything special in your code when checking for iPhone X. | |
public static bool IsIphoneX { | |
get { | |
#if UNITY_IOS | |
// If testing without an iPhone X, add FORCE_IPHONEX to your Scripting Define Symbols. |
This file contains 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 class GyroCamera : MonoBehaviour | |
{ | |
// STATE | |
private float _initialYAngle = 0f; | |
private float _appliedGyroYAngle = 0f; | |
private float _calibrationYAngle = 0f; | |
private Transform _rawGyroRotation; |
This file contains 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
// UnityからAndroidのCamera LEDを制御する例 | |
// startPreview() でカメラのプレビューを開始した状態で LEDOn() で光る | |
public class AndroidCamera { | |
AndroidJavaObject camera = null; | |
public AndroidCamera() { | |
WebCamDevice[] devices = WebCamTexture.devices; | |
Debug.Log("Camera Name:"+devices[0].name); |