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; | |
using System; | |
using System.Runtime.InteropServices; | |
public class WindowControl : MonoBehaviour { | |
// 参照元 | |
// http://answers.unity3d.com/questions/13523/is-there-a-way-to-set-the-position-of-a-standalone.html | |
// http://stackoverflow.com/questions/2825528/removing-the-title-bar-of-external-application-using-c-sharp | |
// https://gist.github.com/mattatz/ca84b487c5697e7d43f8216c57a2b975 |
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
using UnityEngine; | |
[RequireComponent(typeof(Camera))] | |
public class SceneCameraController : MonoBehaviour | |
{ | |
public Vector3 targetPoint; // 注視点 | |
public float rotateSpeed = 10; | |
public float translateSpeed = 1; | |
public float zoomSpeed = 5; |
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
// 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
Shader "Unlit/Billboard" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" } |
OlderNewer