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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
/// <summary> | |
/// UnityのMathfをdoubleで行う。 | |
/// 精度を上げるため | |
/// </summary> | |
public class MathExtend |
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 System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
public class TaskExtensions | |
{ | |
/** | |
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
/** | |
CancellationTokenSource eventActCts; | |
void Cancel_AsynEventTest() | |
{ | |
if(eventActCts != null) | |
{ | |
eventActCts.Cancel(); | |
} | |
eventActCts = null; |
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.Threading.Tasks; | |
using System.Threading; | |
public static class LeanTweenAsyncExtensions | |
{ | |
//public static async Task AwaitCompletionAsync(this LTDescr tween) | |
//{ | |
// var tcs = new TaskCompletionSource<bool>(); | |
// tween.setOnComplete(() => tcs.TrySetResult(true)); |
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
/// <summary> | |
/// Equirectangular座標から球面の3D座標に変換する関数 | |
/// </summary> | |
/// <param name="lon">経度(0から1の範囲)</param> | |
/// <param name="lat">緯度(0から1の範囲)</param> | |
/// <returns></returns> | |
Vector3 EquirectangularToSphereCoordinates(float lon, float lat) | |
{ | |
float u = lon; | |
float v = lat; |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[ExecuteInEditMode] | |
public class MeshTextureColorPicker : MonoBehaviour | |
{ | |
/// <summary> | |
/// Meshをstaticにしているとbatchで結合されsubmeshIndexが異なり正常に取得できなくなる。 | |
/// 対応方法 (対象となるMeshをBatchingの対応外にする) |
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.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 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 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 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 () { |
NewerOlder