Skip to content

Instantly share code, notes, and snippets.

@NNNIC
NNNIC / DumpAnimationClip.cs
Last active March 9, 2023 07:27
Dump AnimationClip Sample
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class DumpAnimationClip {
[MenuItem("Assets/dump animation clip")]
static void Dump()
{
@NNNIC
NNNIC / StateManagerWithPahse.cs
Last active November 23, 2017 10:41
State Manager runs state function with internal phases.
using System.Collections;
using System.Collections.Generic;
using System;
/// <summary>
///
/// State Manager With Phase
///
/// State Function has internal phases.
///
@NNNIC
NNNIC / Split.cs
Last active August 19, 2017 07:25
Split string by comma considering if commas exist between pair of parentheses
public static List<string> Split(string val)
{
if (string.IsNullOrEmpty(val)) return null;
var list = new List<string>();
char[] pair_start = new char[] { '(','[','{' };
char[] pair_end = new char[] { ')',']','}' };
var stack = new List<char>();
@NNNIC
NNNIC / ExcelWork.cs
Last active December 10, 2017 00:17
Excel Access sample
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using Excel = Microsoft.Office.Interop.Excel;
using Office = Microsoft.Office.Core;
@NNNIC
NNNIC / ReadOnceValue.cs
Created January 1, 2018 21:04
Read Once Value
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public class ReadOnceValue<T>
{
T m_resetVal;
T m_val;
@NNNIC
NNNIC / IniUtil.cs
Created January 4, 2018 01:34
Ini File Utility
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// https://ja.wikipedia.org/wiki/INI%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB
///
/// 追加仕様
/// 行を跨ぐ文字列取得。
@NNNIC
NNNIC / RegexUtil.cs
Last active June 22, 2018 01:14
Regular Expression Utility
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;
using System.Text.RegularExpressions;
public class RegexUtil
@NNNIC
NNNIC / Excel_Ole_setget.cs
Last active June 27, 2018 06:14
Excel OLE Object Value Set/Get
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
@NNNIC
NNNIC / Coroutine.cs
Created June 29, 2018 01:22
Coroutine Sample
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public static class Coroutine
@NNNIC
NNNIC / ProcessUtil
Created July 1, 2018 23:53
Kill process C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public class ProcessUtil
{
public static void Kill(string name)
{