Skip to content

Instantly share code, notes, and snippets.

Shader "Raymarching/Test"
{
SubShader
{
Tags { "RenderType" = "Opaque" "DisableBatching" = "True" "Queue" = "Geometry+10" }
Cull Off
CGINCLUDE
using UnityEngine;
using UnityStandardAssets.ImageEffects;
[ExecuteInEditMode]
public class SengaEffect : ImageEffectBase
{
public float sampleDistance = 1;
public float normalEdge = 0.1f;
public float depthEdge = 1f;
Shader "Custom/TestShading" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
}
SubShader {
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf Lambert
struct Input {
float4 color : COLOR;
'use strict';
var removeKeysRecursively = (obj, prop) => {
if (!obj) return;
if (typeof obj === 'object') {
delete obj[prop];
for (let key in obj) {
removeKeysRecursively(obj[key], prop);
}
} else if (Array.isArray(obj)) {
@hecomi
hecomi / DebugLogTest.cs
Last active January 4, 2016 16:42
Unity でネイティブ側から Debug.Log() するヤツ
using UnityEngine;
using System;
using System.Runtime.InteropServices;
public class NativeDebugLog : MonoBehaviour
{
public delegate void DebugLogDelegate(string str);
DebugLogDelegate debugLogFunc = msg => Debug.Log(msg);
[DllImport ("unity_debug_log")]
@hecomi
hecomi / gist:c25739785102932c457d
Created January 2, 2016 16:44
NetworkOperation.cs
using UnityEngine;
using UnityEngine.Networking;
using System.Collections;
public class NetworkOperations : MonoBehaviour
{
private NetworkManager manager_;
private bool isBatchmode_ = false;
public string address = "lab.hecomi.com";
public int port = 30001;
using UnityEngine;
public class Test : MonoBehaviour
{
void Update()
{
var lipSync_ = GetComponent<MMD4M_LipSync>();
if (!lipSync_.isTalking) {
lipSync_.Play("MeiVowels/a");
}
using UnityEngine;
public class Test : MonoBehaviour
{
private MMD4M_LipSync lipSync_;
public AudioClip clip;
void Start()
{
lipSync_ = GetComponent<MMD4M_LipSync>();
using UnityEngine;
using System.Collections;
using System.Reflection;
using System.Linq;
namespace UnityShell
{
static public class Meta
{
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;