Skip to content

Instantly share code, notes, and snippets.

View mattak's full-sized avatar
👨‍💻
working

Takuma Maruyama mattak

👨‍💻
working
View GitHub Profile
using UniRx;
using UnityEngine;
namespace App.UI
{
public class GoalSeRenderer : MonoBehaviour
{
public AudioSource AudioSource;
void Start()
using System.Diagnostics;
using App.Business;
using Unidux;
using UniRx;
namespace App.UI
{
public partial class Unidux : SingletonMonoBehaviour<Unidux>
{
private Store<State> _store;
Shader "Custom/IntensiveLine"
{
Properties
{
_LineWidth("LineWidth", Range(0,1)) = 0.5
_CenterRadius("CenterRadius", Range(0,1)) = 0.5
}
SubShader
{
@mattak
mattak / run-editor-test.sh
Last active July 28, 2016 00:09
Unity test runner
#!/bin/bash
CMD=/Applications/Unity/Unity.app/Contents/MacOS/Unity
LOG=/tmp/unity.log
PROJECT_DIR=`pwd`
$CMD \
-batchmode \
-logfile $LOG \
@mattak
mattak / LazyResource.cs
Created July 27, 2016 09:00
Lazy load for Unity Resource
using UnityEngine;
public class LazyResource<T> where T : UnityEngine.Object
{
public T _value;
public T Value
{
get
{
if (_value == null)
@mattak
mattak / GeoHexPerformanceTest.cs
Last active May 29, 2016 05:25
Utility function for calculating performance.
using System;
using NUnit.Framework;
namespace GeoHex
{
[TestFixture]
public class GeoHexPerformanceTest
{
[Test]
public void Pow3Test()
@mattak
mattak / JsonPerformanceTest.cs
Created May 26, 2016 03:20
Json deserialization performance test in Unity3D.
using System;
using System.IO;
using Newtonsoft.Json;
using UnityEngine;
using UnityEditor;
using NUnit.Framework;
public class JsonPerformanceTest
{
[Serializable]
using UnityEngine;
namespace App
{
public class CameraFinder : MonoBehaviour
{
public Camera DisposeCamera;
private Canvas _canvas;
// Use this for initialization
@mattak
mattak / HelloPlugin.cs
Created March 18, 2016 02:56
UnityView transparent & touchable on Unity 5.3.3f1
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class HelloPlugin : MonoBehaviour
{
[DllImport ("__Internal")]
private static extern void hello_ ();
[DllImport ("__Internal")]
@mattak
mattak / dht11.c
Created March 13, 2016 15:22
dht11 datadog post sample
/*
* dht11.c:
* Simple test program to test the wiringPi functions
* DHT11 test
*/
#include <wiringPi.h>
#include <stdio.h>
#include <stdlib.h>