• This project
    • Loading...
  • Sign in

TelusPlayground / NestApp

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • NestApp
  • Assets
  • _Nest
  • Scripts
  • Utility
  • Singleton.cs
  • Dave Boyle's avatar
    Load filenames / titles for buttons from json streaming over network. button cli… · 99d5dbed ...
    99d5dbed Browse Files
    …cks load movies on server. timeout started
    Dave Boyle authored 2016-06-05 13:30:01 -0400
Singleton.cs 320 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
using UnityEngine;

public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
{
    private static T instance;

    public static T Instance
    {
        get
        {
            if (instance == null)
                instance = (T)FindObjectOfType(typeof(T));

            return instance;
        }
    }
}