Skip to content

Instantly share code, notes, and snippets.

@enue
enue / TextureBlue.cs
Created February 20, 2017 07:56
【Unity】範囲指定可能なブラーエフェクト
using UnityEngine;
using UnityStandardAssets.ImageEffects;
namespace TSKT
{
[ExecuteInEditMode]
[RequireComponent (typeof(Camera))]
public class TextureBlur : PostEffectsBase
{
public float maxBlurSize = 2.0f;
@enue
enue / DirectionalGradation.cs
Created February 20, 2017 02:35
[Unity]UIにグラデーションをつける
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System;
// Unity5.5.1p4
namespace TSKT
{
@enue
enue / Popping.cs
Last active February 20, 2017 00:39
[Unity] ポップする数字
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
namespace TSKT
{
[RequireComponent(typeof(Text))]
public class Popping : BaseMeshEffect
{
@enue
enue / UIVerticesPool.cs
Created February 18, 2017 03:01
[Unity] UIVerticesPool
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TSKT
{
public static class UIVerticesPool
{
static System.WeakReference verticesBuffer;
public static List<UIVertex> Get()
@enue
enue / Sprite-ZWrite.shader
Created February 10, 2017 08:49
[Unity] ZWriteオンSpriteシェーダ
Shader "TSKT/Sprites/ZWrite"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
}
SubShader
@enue
enue / WaterMirror2D.cs
Last active May 16, 2019 06:46
[Unity] 水面反射エフェクト2D
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets;
// Unity5.5.2f1
namespace TSKT
{
[RequireComponent(typeof(Camera))]
@enue
enue / CombineRect.cs
Created January 19, 2017 23:50
[Unity] Rectの合成
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
namespace TSKT
{
public class CombineRect
{
List<Rect> rects = new List<Rect>();
@enue
enue / ShakeColor.cs
Last active February 28, 2017 15:30
[Unity] ShakeColor
using System;
using UnityEngine;
using UnityStandardAssets.ImageEffects;
namespace TSKT
{
[RequireComponent(typeof(Camera))]
public class ShakeColor : ImageEffectBase
{
[Range(0.01f, 1f)]
@enue
enue / TiledMapFile.cs
Created December 23, 2016 00:37
[Unity]TiledMapEditorFile to ScriptableObject
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
// TODO : ObjectGroup対応
// TODO : エクスポートしていないTileSet対応
namespace TSKT
{
@enue
enue / XmlObject.cs
Last active December 22, 2016 22:23
[Unity] Xmlを読み込める汎用ScriptableObject
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Xml;
using System.Linq;
namespace TSKT
{
public class XmlObject : ScriptableObject
{