Skip to content

Instantly share code, notes, and snippets.

@tm8r
tm8r / test1.md
Created March 28, 2013 14:31
markdown test
@tm8r
tm8r / TextureImageImporter.cs
Created April 11, 2016 10:22
TextureImageImporter
using UnityEngine;
using UnityEditor;
using System.IO;
public class TextureImageImporter : AssetPostprocessor
{
static readonly string[] targetExtensions = { ".tga" };
void OnPreprocessTexture ()
{
@tm8r
tm8r / CanvasManager.cs
Created April 12, 2016 11:20
instantiate uGUI prefab
using UnityEngine;
public class CanvasManager : MonoBehaviour
{
GameObject buttonPrefab;
void Awake ()
{
buttonPrefab = Resources.Load<GameObject> ("ugui/Button");
}
@tm8r
tm8r / GUIContentWindow.cs
Last active April 13, 2016 11:40
GUIContentWindow
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
public class GUIContentWindow : EditorWindow
{
List<string> prefabList;
Vector2 scrollPos;
static GUIContentWindow window;
@tm8r
tm8r / EditorAssetBundle.cs
Created April 13, 2016 11:38
EditorAssetBundle
using UnityEngine;
using System.Reflection;
using UnityEditor;
public class EditorAssetBundle : EditorWindow
{
Object[] objs;
[MenuItem ("Window/EditorAssetBundle")]
static void Do ()
@tm8r
tm8r / CoroutineWindow.cs
Created April 25, 2016 12:25
CoroutineEditorWindow
using UnityEngine;
using UnityEditor;
using System.Collections;
using UniRx;
public class CoroutineWindow : EditorWindow
{
static float deltaTime;
static bool isCompleted;
@tm8r
tm8r / CheckSameMaterials.cs
Created May 2, 2016 10:58
CheckSameMaterials
using UnityEngine;
using UnityEditor;
using UniLinq;
using System.IO;
public class CheckSameMaterials
{
static readonly string[] validExtensions = { ".prefab", ".fbx" };
[MenuItem ("Assets/CheckSameMaterials")]
@tm8r
tm8r / MenuPresenter.cs
Created May 13, 2016 11:32
MenuPresenter
using UnityEngine;
using UnityEngine.UI;
using UniRx;
using UniLinq;
using System.IO;
using System.Collections;
using System.Collections.Generic;
namespace Viewer
{
@tm8r
tm8r / UDPManager.cs
Created May 24, 2016 10:07
UnityでUDP受信するやつ
using UnityEngine;
using UniRx;
using UdpReceiverUniRx;
using System.IO;
namespace Viewer
{
public class UDPManager : SingletonMonoBehaviour<UDPManager>
{
public UdpReceiverRx _udpReceiverRx;
@tm8r
tm8r / ManyItemsWindow.cs
Created July 13, 2016 04:26
ManyItemsWindow.cs
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
public class ManyItemsWindow : EditorWindow
{
static ManyItemsWindow window;
static readonly Vector2 windowMinSize = new Vector2 (700f, 300f);
const float lineHeight = 16f;