Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
public class HoverTarget : MonoBehaviour
{
private Rigidbody2D rigidBody;
private bool stationary;
// Use this for initialization
void Start ()
{
using UnityEngine;
using System.Collections;
public class TargetDamage : MonoBehaviour
{
private GameControl control; // Access to the GameControl script
private float damageImpactSpeedSqr; // The square value of Damage Impact Speed, for efficient calculation
private SpriteRenderer spriteRenderer; // The reference to this GameObject's sprite renderer
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class Dropdown : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public RectTransform container;
public bool isOpen;
public Text mainText;
using UnityEngine;
using UnityEditor;
using System.Collections;
using UnityEngine.UI;
[CustomEditor(typeof(Dropdown))]
public class DropdownEditor : Editor
{
public Dropdown currDropdown;
@lena3rika
lena3rika / UIUtility.cs
Last active January 24, 2018 13:27
UIUtility class used in my Dropdown tutorials
using UnityEngine;
using UnityEditor;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class UIUtility : MonoBehaviour
{
//Adds GameObject -> UI -> Dropdown menu item that instantiates
//a new button and attaches a dropdown component.