Skip to content

Instantly share code, notes, and snippets.

View QubitsDev's full-sized avatar
🏠
Working from home

Qubits QubitsDev

🏠
Working from home
View GitHub Profile
@QubitsDev
QubitsDev / QualityDropdown.cs
Created August 26, 2017 01:33
Automatic quality level dropdown.
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 July 22, 2023 21:43
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))]
[AddComponentMenu("UI/ScrollRect Auto-Scroll")]
public class ScrollRectAutoScroll : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
{
public float scrollSpeed = 10f;
private bool mouseOver = false;