Skip to content

Instantly share code, notes, and snippets.

@hecomi
hecomi / ResourecePathAsPopupDrawer.cs
Last active September 7, 2016 03:03
Resoureces 下のファイルを Popup で表示する PropertyDrawer
using UnityEngine;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class ResourcePathAsPopupAttribute : PropertyAttribute
{
public string resourceType;
@hecomi
hecomi / Detector.cs
Last active April 9, 2022 14:18
図形を認識するヤツ
/*
The MIT License (MIT)
Copyright (c) 2014 hecomi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@hecomi
hecomi / Ovrvision.cs
Created November 25, 2014 11:00
Thread 導入したやつ
using System;
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
using System.Threading;
/// <summary>
/// This class provides main interface to the Ovrvision
/// </summary>
public class Ovrvision : MonoBehaviour
@hecomi
hecomi / LeapImageRetriever.cs
Created October 30, 2014 16:41
Light weight leap image retriever
/******************************************************************************\
* Copyright (C) Leap Motion, Inc. 2011-2014. *
* Leap Motion proprietary. Licensed under Apache 2.0 *
* Available at http://www.apache.org/licenses/LICENSE-2.0.html *
\******************************************************************************/
using UnityEngine;
using System.Collections;
using Leap;
@hecomi
hecomi / UGUITouchFinger.cs
Created October 15, 2014 12:53
EventSystem に乗っからないで自前でイベントを管理するヤツ
using System.Linq;
using UnityEngine;
using System.Collections.Generic;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class UGUITouchFinger : MonoBehaviour
{
public enum State
{
using UnityEngine;
using System.Collections;
using System.IO.Ports;
using System.Threading;
public class SerialHandler : MonoBehaviour
{
public delegate void SerialDataReceivedEventHandler(string message);
public event SerialDataReceivedEventHandler OnDataReceived;
using UnityEngine;
using System;
using System.Collections;
using System.IO;
public class OpenJTalkHandler : MonoBehaviour {
private static bool Initialized = false;
private static bool Finalized = false;
#region [ OpenJTalk-related File Paths ]
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Uniduino;
public class Accelerometer : MonoBehaviour
{
private Arduino arduino_;
public Transform target;
public Vector3 basePinValues = Vector3.zero;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class RotateBySerialMessage : MonoBehaviour
{
private List<Vector3> angles = new List<Vector3>();
public int averageNum = 10;
public Vector3 angle {
using UnityEngine;
using System.Collections;
public class TalkTest : MonoBehaviour
{
public string word;
void Update()
{
if (Input.anyKeyDown) {