Skip to content

Instantly share code, notes, and snippets.

View tpritc's full-sized avatar

Tom Pritchard tpritc

View GitHub Profile
@tpritc
tpritc / FadeInAfterSeconds.cs
Last active July 24, 2018 08:21
Fade in GameObjects after a number of seconds. With nice curves.
using UnityEngine;
/// <summary>
/// This component fades the component in after a number of seconds. For it
/// to work, it needs to have a MeshRenderer, and the MeshRenderer needs a
/// material that lets you set the alpha, otherwise it totes won't work.
/// </summary>
[RequireComponent(typeof(MeshRenderer))]
public class FadeInAfterSeconds : MonoBehaviour {