This file contains 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; | |
using System.Collections.Generic; | |
using System.IO; | |
public partial class BonusMenuItems | |
{ | |
[MenuItem("Tools/Add All Scenes to Build")] | |
static void AddAllScenesToBuild() |
This file contains 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 "Custom/World Space UV" { | |
Properties { | |
_Color ("Main Color", Color) = (0.5,0.5,0.5,1) | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
//_Ramp ("Toon Ramp (RGB)", 2D) = "gray" {} | |
_Scale ("Texture Scale", Float) = 0.1 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ArcRender : MonoBehaviour | |
{ | |
public int Count = 10; | |
public float PowerMultiplier = 2; | |
public Transform handle; |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
//https://stackoverflow.com/questions/31389598/how-can-i-detect-a-shake-motion-on-a-mobile-device-using-unity3d-c-sharp | |
public class ShakeInputEvent : MonoBehaviour | |
{ | |
public delegate void onShakeInput(); | |
/// when the phone is shaken |
This file contains 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; | |
public class GizmoRaycastToGround : MonoBehaviour { | |
void OnDrawGizmos() | |
{ | |
RaycastHit hit = new RaycastHit(); | |
if (Physics.Raycast(transform.position,Vector3.down,out hit)) | |
{ | |
Gizmos.DrawWireCube(hit.point, new Vector3(0.1f, 0, 0.1f)); |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
//shift x,y,z to move along axis | |
//TODO apply movement to each selected object | |
//BUG scene view needs to be focused to detect mouse movements | |
public class MouseMoveWindow : EditorWindow |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
[CustomEditor(typeof(CubicBezierPath))] | |
public class CubicBezierEditor : Editor | |
{ | |
void OnSceneGUI() | |
{ |
OlderNewer