Skip to content

Instantly share code, notes, and snippets.

View PostleService's full-sized avatar

PostleService

View GitHub Profile
@SolidAlloy
SolidAlloy / BoxCastDrawer.cs
Created May 17, 2020 14:36
A class that allows to visualize Unity Physics2D.BoxCast() method.
using UnityEngine;
/// <summary>
/// A class that allows to visualize the Physics2D.BoxCast() method.
/// </summary>
/// <remarks>
/// Use Draw() to visualize an already cast box,
/// and BoxCastAndDraw() to cast a box AND visualize it at the same time.
/// </remarks>
@mandarinx
mandarinx / ScrollRectAutoScroll.cs
Created August 22, 2017 11:30 — forked from QubitsDev/ScrollRectAutoScroll.cs
Unity3d ScrollRect Auto-Scroll, Dropdown Use: Places this component in the Template of Dropdown (with the ScrollRect component)
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
[RequireComponent(typeof(ScrollRect))]
public class ScrollRectAutoScroll : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public float scrollSpeed = 10f;
private bool mouseOver = false;