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
#if UNITY_EDITOR | |
static double waitTime = 0; | |
void OnEnable() | |
{ | |
waitTime = EditorApplication.timeSinceStartup; | |
EditorApplication.update += EditorUpdate; | |
} | |
void OnDisable() |
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 RotateTest : MonoBehaviour { | |
public Vector3 axis = Vector3.up; | |
public float rotSpeed = 0; | |
public float power = 0.1f; | |
public float friction = 0.98f; | |
public float stickPower = 100; |
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.IO; | |
using UnityEngine; | |
public static class Dump | |
{ | |
public static void DumpVector3(Vector3[] datas, string fileName) | |
{ | |
StreamWriter sw; | |
string date = System.DateTime.Now.ToString("yyyyMMddtthhmmss"); | |
string filePath = Application.dataPath + "/../" + fileName + "_" + date + ".txt"; |
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; | |
namespace KUtil | |
{ | |
public static class Utility | |
{ | |
/// <summary> | |
/// 点Pと線ABの距離を求める | |
/// </summary> | |
/// <param name="p"></param> |
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
// http://docs.unity3d.com/ja/current/ScriptReference/Camera.RenderToCubemap.html | |
// http://stackoverflow.com/questions/34458622/unity-save-cubemap-to-one-circle-image | |
using UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
using System.IO; | |
public class RenderCubemapWizard : ScriptableWizard | |
{ |
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
// http://docs.unity3d.com/ja/current/ScriptReference/Camera.RenderToCubemap.html | |
// http://stackoverflow.com/questions/34458622/unity-save-cubemap-to-one-circle-image | |
using UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
using System.IO; | |
public class RenderCubemapWizard : ScriptableWizard | |
{ |
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
REM "フォルダ名=appname" | |
for %%* in (.) do set appname=%%~nx* | |
if not exist LogBackup/ mkdir LogBackup | |
REM 10日以上前のログファイル削除 | |
forfiles /P LogBackup /D -10 /M "output_log_*.txt" /c "cmd /c del @file" | |
:begin |
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; | |
namespace Utility | |
{ | |
/// <summary> | |
/// シェーダー定義 | |
/// </summary> | |
public static class ShaderDefines | |
{ | |
public enum TextureID |
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
#!/bin/bash | |
function convUTF16() { | |
n=`echo $((0x$1-0x10000))` | |
nn=$n | |
if [ $n -lt 0 ]; then | |
nn=`echo $((0x$1))` | |
fi | |
echo $nn | |
} |
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 ScreenAdjustTransform : MonoBehaviour { | |
public Camera targetCamera = null; | |
void AdjustScreen() | |
{ | |
float height = targetCamera.orthographicSize * 2; | |
float width = height * targetCamera.aspect; |
OlderNewer