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; | |
// put this script inside an Editor folder. | |
[CustomPropertyDrawer(typeof(ReadOnlyInspector))] | |
public class ReadOnlyInspectorDrawer : PropertyDrawer | |
{ | |
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) | |
{ |
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; | |
// put this script inside your Scripts folder. | |
public class ReadOnlyInspector : PropertyAttribute { } |
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; | |
public class ClearPlayerPrefs | |
{ | |
[MenuItem("Tools/Clear PlayerPrefs")] | |
private static void ClearAllPlayerPrefs() | |
{ | |
if(EditorUtility.DisplayDialog("Clear ALL PlayerPrefs", "Do you really want to clear ALL the PlayerPrefs\nof this project ?\n\nYou cannot undo this action.", "Yep", "Nah")) | |
{ |
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; | |
using System.Collections.Generic; | |
public class ComponentsViewer : EditorWindow | |
{ | |
[MenuItem("Window/Help/GameObject/Components Viewer")] | |
private static void Init() |
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 "DualMaps" | |
{ | |
Properties | |
{ | |
_MainTex("Main (RGB)", 2D) = "black" {} | |
_SecTex("Main (RGB)", 2D) = "white" {} | |
_FilTex("Filter (Alpha)", 2D) = "black"{} | |
} | |
SubShader |
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; | |
public class PaddleBounceDirectionController : MonoBehaviour | |
{ | |
[SerializeField] | |
private Transform bounceSurface; | |
[SerializeField] | |
private float bounceSurfaceLength = 2f; |
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
[System.Serializable] | |
public class CirclelLineRenderer | |
{ | |
[SerializeField] | |
private LineRenderer lineRenderer; | |
public LineRenderer LINE_RENDERER | |
{ | |
get { return lineRenderer; } | |
set |
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; | |
public static class intExtensions | |
{ | |
public static bool CheckIndex(this int index, ICollection col) | |
{ | |
return ((index >= 0) && (index < col.Count)); | |
}// CheckIndex() |
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; | |
using System.Collections.Generic; | |
public class CheckEmptyMesh : EditorWindow | |
{ | |
[MenuItem("Window/Check Empty Mesh")] | |
private static void Init() |
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; | |
[System.Serializable] | |
public class TwirlLineRenderer | |
{ | |
[SerializeField] private LineRenderer lineRenderer; | |
[SerializeField] private float radius = 1f; | |