Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
public class AroundAndAround : MonoBehaviour {
public float Speed = 1.0f, Radius = 20.0f;
void Update () {
transform.Rotate(0, Speed, 0);
transform.localPosition = transform.forward * Radius;
@yunojy
yunojy / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yunojy
yunojy / AssetStoreLink1.cs
Last active August 29, 2015 14:12
Unity Editor Extension - Asset Store Link
using UnityEngine;
using UnityEditor;
using System.Collections;
public class AssetStoreLink1 : EditorWindow {
[MenuItem("Window/Asset Store - Web")]
static void Open() {
System.Diagnostics.Process.Start("https://www.assetstore.unity3d.com/jp/");
}
@yunojy
yunojy / LeapDataVisualizer.cs
Last active December 23, 2015 15:09
Leap Motion Data Visualizer for Unity Usage: 1. put scripts 2. create Empty GameObject 3. Add LeapDataVisualizer.cs https://twitter.com/yuujii/status/381442731047809024
using UnityEngine;
using System.Collections;
using Leap;
namespace US {
/// <summary>
/// Leap Motion Data Visualizer
/// Assets/Scripts/LeapDataVisualizer.cs
/// </summary>
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
using System.Reflection;
using System.IO;
/// <summary>
/// NovintFalconを操作デバイスとして使うscript ※Windows用(dll依存)
///
/// usage:
@yunojy
yunojy / DebugCameraControl.cs
Created May 9, 2016 14:47
Unity Editor Like CameraControl
using UnityEngine;
public class DebugCameraControl : MonoBehaviour {
#if UNITY_EDITOR
private Vector3 oldPos;
void Update() {
if (Input.GetMouseButton(1)) {
@yunojy
yunojy / HoloLensGestures.cs
Last active June 3, 2016 14:04
HoloLensでGestureのAir-TapのPressのみのサンプル。 https://developer.microsoft.com/en-us/windows/holographic/gestures_in_unity
using UnityEngine;
using System.Collections;
using UnityEngine.VR.WSA.Input;
public class HoloLensGestures : MonoBehaviour {
[SerializeField]
UnityEngine.Events.UnityEvent ev;
void Start()
@yunojy
yunojy / YomEmotion.cs
Created December 24, 2016 12:37
Cognitive ServicesのEmotion APIhttp://2vr.jp/2016/12/24/oculus-vr-xmas2016/ ‎
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.VR.WSA.WebCam;
using System.Linq;
public class YomEmotion : MonoBehaviour {
public string EmotionAPIKey = "";
public float CaptureInterval = 60f;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.VR.WSA.WebCam;
using System.Linq;
public class YomEmotion : MonoBehaviour {
public string EmotionAPIKey = "";
public float CaptureInterval = 60f;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(AudioSource))]
public class PlayAudio : MonoBehaviour {
public AudioClip[] audioClips;
private AudioSource audioSource;