This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ////////////////////////////////////////////////////////////////////////// | |
| // GreyScale.shader | |
| // | |
| // unlit transparent texture with greyscale effect. | |
| // | |
| // (c) 2014 hwkim | |
| ////////////////////////////////////////////////////////////////////////// | |
| Shader "Extension/GrayScale" | |
| { | |
| Properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static float AngleAroundAxis (Vector3 dirA, Vector3 dirB, Vector3 axis) | |
| { | |
| // Project A and B onto the plane orthogonal target axis | |
| dirA = dirA - Vector3.Project (dirA, axis); | |
| dirB = dirB - Vector3.Project (dirB, axis); | |
| // Find (positive) angle between A and B | |
| float angle = Vector3.Angle (dirA, dirB); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "FX/Ghost" { | |
| Properties { | |
| _Color ("Color", Color) = (1,1,1,1) | |
| _MainTex ("Albedo (RGB)", 2D) = "white" {} | |
| _NormalTex ("Normal (RGB)", 2D) = "white" {} | |
| _EmissionTex ("Emission (RGB)", 2D) = "white" {} | |
| _Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
| _Metallic ("Metallic", Range(0,1)) = 0.0 | |
| _Blightness ("Metallic", Range(0,3)) = 0.0 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| /// <summary> | |
| /// 「Window/SerializedObject Editor」で起動。 | |
| /// 選択中のObjectと関連ObjectからSerializedObjectを作ってPropertyを全て表示する。 | |
| /// </summary> | |
| public class SerializedObjectEditor : EditorWindow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| [ExecuteInEditMode] | |
| public class SetLightmapsManually : MonoBehaviour | |
| { | |
| public int m_lightmapIndex = 255; | |
| public float m_lightmapTilingX = 1f; | |
| public float m_lightmapTilingY = 1f; | |
| public float m_lightmapOffsetX = 0f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEditor; | |
| using System.Threading; | |
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| public class LoomEditorWindow : EditorWindow { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // with tweening animation... | |
| TweenAlpha transition = TweenAlpha.Begin(FadeOut.gameObject, this.fadeInTime, duration); | |
| transition.from = 0f; | |
| transition.ResetToBeginning(); | |
| EventDelegate.Add(transition.onFinished, OnFinished, true); | |
| void OnFinished() | |
| { | |
| // called at the end of alpha tweening animation. | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub MultipleSubs() | |
| Dim rng As Range | |
| Dim cell As Range | |
| Set rng = Sheets("CardDataTable").Range("K2:K323") | |
| For Each cell In rng | |
| cell = WorksheetFunction.Substitute(cell, "_base", "") | |
| Next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Retrieves selected folder on Project view. | |
| /// </summary> | |
| /// <returns></returns> | |
| public static string GetSelectedPathOrFallback() | |
| { | |
| string path = "Assets"; | |
| foreach (UnityEngine.Object obj in Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets)) | |
| { |