Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Qubits QubitsDev

🏠
Working from home
View GitHub Profile
@QubitsDev
QubitsDev / QualityDropdown.cs
Created Aug 26, 2017
Automatic quality level dropdown.
View QualityDropdown.cs
using UnityEngine;
using UnityEngine.UI;
[RequireComponent(typeof(Dropdown))]
public class QualityDropdown : MonoBehaviour
{
private Dropdown m_Dropdown;
/// <summary>
/// Start is called on the frame when a script is enabled just before
/// any of the Update methods is called the first time.
/// </summary>
@QubitsDev
QubitsDev / ScrollRectAutoScroll.cs
Last active Aug 16, 2021
Unity3d ScrollRect Auto-Scroll, Dropdown Use: Places this component in the Template of Dropdown (with the ScrollRect component)
View ScrollRectAutoScroll.cs
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
[RequireComponent(typeof(ScrollRect))]
[AddComponentMenu("UI/ScrollRect Auto-Scroll")]
public class ScrollRectAutoScroll : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public float scrollSpeed = 10f;
private bool mouseOver = false;