Skip to content

Instantly share code, notes, and snippets.

View isaveu's full-sized avatar

James park isaveu

  • YMX Inc
  • Seoul, Korea
View GitHub Profile
@isaveu
isaveu / Client.cs
Last active August 29, 2015 14:17 — forked from leandrosilva/Client.cs
// Asynchronous Client Socket Example
// http://msdn.microsoft.com/en-us/library/bew39x2a.aspx
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Text;
// State object for receiving data from remote device.
@isaveu
isaveu / Editor\CanvasWindow.cs
Created April 5, 2016 12:37 — forked from whoo24/Editor\CanvasWindow.cs
UnityEditor.EditorWindow 클래스 확장 Extending UnityEditor.EditorWindow class
using UnityEngine;
using UnityEditor;
using System;
public class CanvasWindow : EditorWindow {
[MenuItem("Canvas/Show")]
public static void ShowWindow()
{
CanvasWindow window = (CanvasWindow)EditorWindow.GetWindow(typeof(CanvasWindow));
@isaveu
isaveu / AudioKey.cs
Created May 16, 2016 00:33 — forked from EsProgram/AudioKey.cs
Unity Audio Manager
/*手動で変更しないでください*/
public enum AudioKey
{
}
@isaveu
isaveu / SepiaVF.shader
Created May 16, 2016 00:35 — forked from EsProgram/SepiaVF.shader
セピア調シェーダ作ってみた ref: http://qiita.com/Es_Program/items/d6b504550e34522d62bc
Shader "Custom/SepiaVF"{
Properties{
_MainTex("Main", 2D) = "black"{}
}
SubShader{
Lighting Off
Pass{
CGPROGRAM
Shader "Custom/BlurVF" {
Properties{
_MainTex("Texture", 2D) = "white" {}
_Diff("Diff", Range(0, 1)) = 0.1
}
SubShader{
Pass{
CGPROGRAM
#pragma fragment frag
Shader "Custom/RimLighting" {
Properties{
_MainTex("Texture", 2D) = "white"{}
_RimWidth("RimWidth", Range(0.5, 5.0)) = 2.0
_Color("Color", Color) = (1, 1, 1, 0)
}
SubShader{
Pass{
CGPROGRAM
#pragma vertex vert
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
public class PacketQueue
{
/// <summary>
/// パケットの情報
@isaveu
isaveu / AlphaGameObject.cs
Created May 16, 2016 00:40 — forked from EsProgram/AlphaGameObject.cs
Unity:自身のゲームオブジェクトに関連付けられた全てのマテリアルのアルファ値を0に近付けていって全てが透明になったらゲームオブジェクトを破棄する(マテリアルのShaderはTransparentに設定しておく)
public class AlphaGameObject : MonoBehaviour
{
private Color alpha = new Color(0, 0, 0, 0.01f);
private List<Material> materials = new List<Material>();
private void Start()
{
//マテリアルの取得
foreach(Transform child in transform)
{
#if UNITY_EDITOR
AnimatorController mecanimController = null ;
// Animation Controller 파일을 생성
mecanimController = UnityEditor.Animations.AnimatorController.CreateAnimatorControllerAtPath ( "Assets / Resources / Mecanims / HeroMecanim.controller" );
// Animation Controller에 애니메이션을 전환시키기위한 조건이되는 매개 변수를 추가
mecanimController.AddParameter ( "RunTrigger" , AnimatorControllerParameterType.Trigger);
mecanimController.AddParameter ( "JumpTrigger" , AnimatorControllerParameterType.Trigger);
mecanimController.AddParameter ( "SlidingTrigger" , AnimatorControllerParameterType.Trigger);
mecanimController.AddParameter ( "DownTrigger" , AnimatorControllerParameterType.Trigger);
@isaveu
isaveu / GoogleMap.cs
Created September 7, 2016 10:00 — forked from derme302/GoogleMap.cs
Load a Google Map into Unity3D
/*
* Based on the Google Maps for Unity Asset
* https://www.assetstore.unity3d.com/en/#!/content/3573
* However the relience on UniWeb has been removed
*
*
Getting Started
---------------
1. Assign the GoogleMap component to your game object.