Skip to content

Instantly share code, notes, and snippets.

@NNNIC
NNNIC / _Comment.cs
Created June 22, 2020 06:50
Unity Simple Comment Component
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/*
This is a general purpose to add comments for GameObject
*/
public class _Comment : MonoBehaviour {
@NNNIC
NNNIC / main.rs
Created May 30, 2020 03:12
State Function Rust Example
#[allow(dead_code)]
mod hoge_control {
#[derive(PartialEq,Clone,Copy)]
enum State {
None,
Sstart,
Shoge,
Send,
}
@NNNIC
NNNIC / test.cs
Created July 17, 2019 06:15
bitconverter sample C#
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test
{
public class item {
@NNNIC
NNNIC / StateManager.java
Created August 21, 2018 13:57
State Manager Java sample
import java.util.function.Consumer;
public class StateManager {
Consumer<Boolean> m_curfunc;
Consumer<Boolean> m_nextfunc;
public void Goto(Consumer<Boolean> func) {
m_nextfunc = func;
}
@NNNIC
NNNIC / template-source.txt
Created August 13, 2018 06:51
psgg unity enumulator sample
:output=MainControl_created.cs
::tempfunc=template-func.txt
:enc=utf-8
::
using System;
using System.Collections;
public partial class MainControl {
public string m_cur = null;
public string m_next = null;
@NNNIC
NNNIC / EventMachine.cs
Last active August 17, 2018 00:02
Event machine is a task or process that has both event-manager and state machine. It is for Unity.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
public class EventMachine {
#region event manager
protected EventManager m_evman;
@NNNIC
NNNIC / ListAllAnimationClipsInFolde.cs
Last active July 31, 2018 04:49
List up all animation clips in all fbx files under the selected folder
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEditor;
public class ListAllAnimartionClipsInFolde {
[MenuItem("Assets/list all animation clip (fbx) in the folder")]
static void List()
@NNNIC
NNNIC / startUnityProject.bat
Last active July 26, 2018 01:44
Unity start batch.
cd /d %~dp0
if exist %~dp0unityProject goto :_open
start "" "%unitypath2018_2%" -createproject %~dp0unityProject
goto :eof
:_open
start "" "%unitypath2018_2%" -projectPath %~dp0unityProject
@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)
{
@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