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 class JoyY : MonoBehaviour { | |
| public float power = 0.02f; | |
| public Vector3 targetPos; | |
| // 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
| #if UNITY_EDITOR | |
| using UnityEngine; | |
| using UnityEditor; | |
| // Unity にザオリク機能を追加します | |
| [InitializeOnLoad] | |
| static class Zaoriku | |
| { | |
| static Zaoriku() { | |
| EditorApplication.playmodeStateChanged += OnPlaymodeChanged; |
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
| // Tracking State を得る | |
| OVR.ovrTrackingState ts = OVRDevice.HMD.GetTrackingState(); | |
| // ポジショントラッキング されているか? | |
| if ( (ts.StatusFlags & (uint)OVR.ovrStatusBits.ovrStatus_PositionTracked ) != 0 ) { | |
| // ポジショントラッキング範囲内 | |
| print( "Tracking!" ); | |
| } |
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 class SetPositionY : MonoBehaviour { | |
| void Start () { | |
| // スタート時のワールド座標での位置を取得 | |
| Vector3 pos = transform.position; | |
| // 位置からTerrain上の高さを取得 |
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
| #!ruby -Ku | |
| # Google Glass へメッセージ通知 (Mirror API) | |
| # by GOROman | |
| require 'net/http' | |
| require 'json' | |
| # OAuthで得たトークン | |
| TOKEN = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
| API = 'https://www.googleapis.com/mirror/v1/timeline' |
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
| echo off | |
| netsh WLAN connect name="GoProHero1" ssid="GoProHero1" | |
| pause | |
| netsh WLAN connect name="GoProHero2" ssid="GoProHero2" | |
| pause | |
| netsh WLAN connect name="GoProHero3" ssid="GoProHero3" |
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
| void SetAndroidVolume( int volume ) | |
| { | |
| #if (UNITY_ANDROID && !UNITY_EDITOR) | |
| int STREAM_MUSIC = 3; // Constant Value: 3 (0x00000003) | |
| AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | |
| AndroidJavaObject ac = jc.GetStatic<AndroidJavaObject>("currentActivity"); | |
| AndroidJavaObject am = ac.Call<AndroidJavaObject>("getSystemService", "audio"); | |
| am.Call("setStreamVolume", STREAM_MUSIC, volume, 0); |
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; | |
| // 草原クラス | |
| class WWWWWWWWWWWWWWWWWWWWWWWW : MonoBehaviour { | |
| public void wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww() { | |
| Debug.Log ( "wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww"); | |
| } | |
| } |
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
| # スーパーハカー用プログラム | |
| require 'socket' | |
| # 開くポート | |
| PORT = 5656 # 適当なポート | |
| # TCPサーバーになっちゃう | |
| TCPServer.open( PORT ) do |server| | |
| loop do |
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
| Cygwinにしたら解決しました・・・ | |
| $ ruby -v | |
| ruby 1.9.3p448 (2013-06-27) [x86_64-cygwin] | |
| $ twurl -v | |
| 0.9.1 | |
| $ twurl -d 'status=HELLO KARAAGE!' -X POST "/1.1/statuses/update_with_media.json" --file "TEST.png" --file-field "media[]" -t |
OlderNewer