Skip to content

Instantly share code, notes, and snippets.

@sh-akira
sh-akira / KeyboardAction.cs
Created July 28, 2018 17:28
Unity Keyboard Event Sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
public class KeyboardEventArgs : EventArgs
{
public int KeyCode { get; }
@sh-akira
sh-akira / RestartOnStop.cs
Last active September 11, 2018 07:02
UnityエディタでStopしたときにエディタを再起動するエディタ拡張です
//
// Unity Restart Editor On Stop
// @sh_akira
// Put this file to Assets/Editor/
//
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
@sh-akira
sh-akira / SteamVRTracker.cs
Last active September 21, 2021 16:18
SteamVR Plugin 2.xでVIVEトラッカーの役割設定からトラッカー位置を取得するサンプル(肘と膝を含む)
// SteamVR 2.x Tracker Role Pose Example
// MIT License
// Copyright (c) 2021 sh_akira
using System;
using System.Runtime.InteropServices;
using UnityEngine;
using Valve.VR;
namespace akr.Avatar.Tracking
@sh-akira
sh-akira / AsyncTcpListener.cs
Created February 22, 2022 14:38
.NET Framework 4.7.2でのTCPサーバーの実装サンプル
// MIT License
// Copyright (c) 2022 sh_akira
using System;
using System.Collections.Concurrent;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
@sh-akira
sh-akira / AnimationSplitter.cs
Created April 17, 2019 22:23
Unityでanimファイルを指定秒数で分割して出力するエディタ拡張です
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace akr.Unity.Editor.Animation
{
public class AnimationSplitter : EditorWindow
{