Show / Hide Table of Contents

Class Singleton<T>

Singleton pattern class. This class detects if T is a MonoBehavior and will make a containing GameObject.

Inheritance
System.Object
Singleton<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace:Mapbox.Unity.Utilities
Assembly:cs.temp.dll.dll
Syntax
public class Singleton<T>
    where T : UnityEngine.Object
Type Parameters
Name Description
T

The typename of the class to create as a singleton object.

Remarks

An instance of this class needs to be of type UnityEngine.Object As long as this is used with UnityEngine classes, this should work fine. This is to resolve issue #116 https://github.com/mapbox/mapbox-unity-sdk/issues/116

Properties

Instance

Returns the Singleton instance of T.

Declaration
public static T Instance { get; }
Property Value
Type Description
T
Back to top © 2017 Mapbox