Skip to content

Instantly share code, notes, and snippets.

View gok11's full-sized avatar
🌶️

Hiroki Miyada gok11

🌶️
View GitHub Profile
Shader "UI/BoxScaleWave"
{
Properties
{
_SplitCount("SplitCount", int) = 1
_OriginX("Origin X", Range(0, 1)) = 0
_OriginY("Origin Y", Range(0, 1)) = 0
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
@gok11
gok11 / EditorGUILayoutEx.cs
Created October 22, 2016 15:50
エディタ拡張で仕切り線を描く ref: http://qiita.com/Gok/items/96e8747269bf4a2a9cc5
using UnityEngine;
using UnityEditor;
public class EditorGUILayoutEx {
/// <summary>
/// インデントレベル設定を考慮した仕切り線.
/// </summary>
/// <param name="useIndentLevel">インデントレベルを考慮するか.</param>
@gok11
gok11 / LengthSpeedTest.cs
Created October 1, 2016 15:30
配列に循環的にアクセスする方法3つの速度を調べてみた ref: http://qiita.com/Gok/items/df12ae2b1b1f5ea13fcb
using UnityEngine;
public class LengthSpeedTest : MonoBehaviour {
int testCount = 1000000;
const int ArrayLength = 1 << 2;
readonly int mask = ArrayLength - 1;
int idx = 0;
public interface IUpdatable {
void UpdateMe();
}
using UnityEngine;
using System;
namespace GokUtil.UpdateManager
{
public class UpdateManager : MonoBehaviour
{
const int InitialSize = 16;
private int tail = 0;
@gok11
gok11 / DummyComponent.cs
Last active February 13, 2016 16:32
GetComponent()の速度を改めて計測してみる ref: http://qiita.com/backlight1144/items/d2096c1369bb890ebbff
using UnityEngine;
public class DummyComponent : MonoBehaviour { }
@gok11
gok11 / LinearMove.cs
Created February 1, 2016 09:38
AnimationCurveを使って値を変化させる ref: http://qiita.com/backlight1144/items/f3005bdc6324ba8b491b
using UnityEngine;
using System.Collections;
public class LinearMove : MonoBehaviour {
[SerializeField] private Vector3 destPos;
[SerializeField] private float tweenTime;
private bool isMoving = false;