Skip to content

Instantly share code, notes, and snippets.

@unitycoder
unitycoder / scroll-image-ui.shader
Created December 27, 2018 07:36
Scrolling UI Image
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// unitycoder.com: added simple scrolling UV
Shader "UI/Default-Scroll"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
@mstevenson
mstevenson / Fps.cs
Last active April 19, 2024 03:04
An accurate FPS counter for Unity. Works in builds.
using UnityEngine;
using System.Collections;
public class Fps : MonoBehaviour
{
private float count;
private IEnumerator Start()
{
GUI.depth = 2;