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
//Has to go at the top of your file | |
#pragma strict | |
import System.Collections.Generic; | |
//The list of colliders currently inside the trigger | |
var TriggerList : List.<Collider> = new List.<Collider>(); | |
//called when something enters the trigger | |
function OnTriggerEnter(other : Collider) | |
{ |
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 UnityEditor; | |
using UnityEngine; | |
public class ReadOnlyAttribute : PropertyAttribute | |
{ | |
} | |
[CustomPropertyDrawer(typeof(ReadOnlyAttribute))] | |
public class ReadOnlyDrawer : PropertyDrawer |
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 | |
//------------------------------------------------------------------------- | |
[UnityEditor.CustomEditor( typeof( UIElement ) )] | |
public class UIElementEditor : UnityEditor.Editor | |
{ | |
//------------------------------------------------- | |
// Custom Inspector GUI allows us to click from within the UI | |
//------------------------------------------------- | |
public override void OnInspectorGUI() | |
{ |
OlderNewer