Skip to content

Instantly share code, notes, and snippets.

@enue
enue / chars
Last active October 2, 2022 10:05
ゲームに使いそうな文字セット
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]_abcdefghijklmnopqrstuvwxyz{|}~
あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゐゆゑよらりるれろわをん
ぁぃぅぇぉゃゅょっ
がぎぐげござじずぜぞだぢづでどばびぶべぼ
ぱぴぷぺぽ
アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン
ァィゥェォャュョッ
ガギグゲゴザジズゼゾダヂヅデドバビブベボ
パピプペポ
@enue
enue / InputActionExtension.cs
Last active June 6, 2021 08:40
subscribe InputAction callbacks
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public static class InputActionExtension
{
static public System.IDisposable SubscribePerform(this InputAction action,
System.Action<InputAction.CallbackContext> callback)
{
@enue
enue / ImageTrimmer.cs
Created September 8, 2016 08:05
立ち絵の透明部分をトリミングする
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
namespace TSKT
{
public class ImageTrimmer : AssetPostprocessor
{
static bool IsTarget(string path)
@enue
enue / ReactiveDictionaryExtentions.cs
Created December 25, 2020 13:16
ReactiveDictionary.ObserveValue
using UniRx;
namespace TSKT
{
public static class ReactiveDictionaryExtentions
{
public static ReadOnlyReactiveProperty<V> ObserveValue<K, V>(this ReactiveDictionary<K, V> dict, K key, V defaultValue = default)
{
var comparer = EqualityComparer<K>.Default;
var hashCode = comparer.GetHashCode(key);
@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 / UnlimitedArray2.cs
Last active May 24, 2019 09:08
for Unity2018.4.0f1
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace TSKT
{
public class UnlimitedArray2<T>
{
T[,] array;
public Vector2Int Min { get; private set; }
@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 / SpreadSheet.cs
Last active April 9, 2019 06:21
かんたんスプレッドシートapi
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using System.Linq;
// https://developers.google.com/sheets/guides/concepts?hl=ja
namespace TSKT
{
@enue
enue / Compression.cs
Last active November 30, 2018 23:30
Deflate圧縮
using UnityEngine;
using System.Collections;
using System;
using System.Text;
using System.IO;
using System.IO.Compression;
// Unity2018.3.0b12
namespace TSKT
@enue
enue / NativeBitArray.cs
Created October 9, 2018 23:17
NativeBitArray for Unity2018.2.8f1
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.Collections;
using UnityEngine;
namespace TSKT
{
public struct NativeBitArray : IDisposable, IEnumerable<bool>
{