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
組み込み関数 (DirectX HLSL) | |
https://msdn.microsoft.com/ja-jp/library/bb509611(v=vs.85).aspx | |
GLSLについてのメモ | |
http://qiita.com/edo_m18/items/71f6064f3355be7e4f45 |
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
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
Shader "Custom/Wireframe" { | |
Properties | |
{ | |
_WireThickness ("Wire Thickness", RANGE(0, 800)) = 100 | |
_Color("Color", Color) = (1,1,1,1) | |
} | |
SubShader | |
{ |
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
public static Vector3 SetLatLonPosition(float r, float lat, float lon) | |
{ | |
float phi = (90-lat)*Mathf.Deg2Rad; | |
float theta = (lon)*Mathf.Deg2Rad; | |
float x = r * Mathf.Sin(phi) * Mathf.Cos(theta); | |
float z = r * Mathf.Sin(phi) * Mathf.Sin(theta); | |
float y = r * Mathf.Cos(phi); | |
Vector3 pos = new Vector3(x,y,z); |
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 TransCh : MonoBehaviour { | |
[System.Serializable] | |
public class TransChannel | |
{ |
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
EventHandler handler = null; | |
handler = (sender, e) => { | |
button1.Click -= handler; | |
MessageBox.Show("click"); | |
}; | |
button1.Click += handler; |
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; | |
using Valve.VR; | |
public class ViveTrackerManagement : 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 System.Collections.Generic; | |
using System.Threading.Tasks; | |
using System.Runtime.CompilerServices; | |
using UnityEngine; | |
public class FadeTransition | |
{ | |
[SerializeField] CanvasGroup canvasGroup = 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; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEngine; | |
public static class CommandLineArgsUtils | |
{ | |
// https://github.com/baba-s/Kogane.CommandLineParser/tree/master/Editor | |
/** |
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.Generic; | |
public class MainThreadDispatcher : MonoBehaviour | |
{ | |
private static MainThreadDispatcher instance; | |
private static readonly object lockObject = new object(); | |
private Queue<System.Action> actions = new Queue<System.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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[ExecuteInEditMode] | |
public class MeshTextureColorPicker : MonoBehaviour | |
{ | |
/// <summary> | |
/// Meshをstaticにしているとbatchで結合されsubmeshIndexが異なり正常に取得できなくなる。 | |
/// 対応方法 (対象となるMeshをBatchingの対応外にする) |