Singleton Pattern Unity creates multiple copies
<p>I am trying to use the Singleton pattern to monitor statistics on a Unity project.  I am using the classes below. The problem I have is that it seems that instead of having only one singleton, my code creates a singleton for every instance I am calling the singleton functions. For example, I call the <code>ShootingStats.Instance.incrementTotalShotsFired();</code> every time a player fires his gun. If I got three players in total, my code seems to generate three of the ShootingStats singeton - one for each player. What I want to achieve is have only a single class to monitor these statistics for all players not one for each.
I have found the singleton code: <a href="http://wiki.unity3d.com/index.php/Singleton" rel="nofollow">http://wiki.unity3d.com/index.php/Singleton</a>. I am new to Unity but quite experienced in programming. I initially tried using a very simple version of the Singleton pattern as someone would use in C# but it did not work as intended. Instead every single time I was accessing one of the singleton methods, it was creating a new object. Many thanks for your help in advance.</p>

<p><strong>Singleton class</strong></p>

<pre><code>using UnityEngine;

/// &lt;summary&gt;
/// Be aware this will not prevent a non singleton constructor
///   such as `T myT = new T();`
/// To prevent that, add `protected T () {}` to your singleton class.
/// 
/// As a note, this is made as MonoBehaviour because we need Coroutines.
/// &lt;/summary&gt;
namespace Porject.Statistics
{
    public class Singleton&lt;T&gt; : MonoBehaviour where T : MonoBehaviour
    {
        private static T _instance;

        private static object _lock = new object();

        public static T Instance
        {
            get
            {
                if (applicationIsQuitting)
                {
                    //Debug.LogWarning("[Singleton] Instance '" + typeof(T) +
                    //  "' already destroyed on application quit." +
                    //  " Won't create again - returning null.");
                    return null;
                }

                lock (_lock)
                {
                    if (_instance == null)
                    {
                        _instance = (T)FindObjectOfType(typeof(T));

                        if (FindObjectsOfType(typeof(T)).Length &gt; 1)
                        {
                            //Debug.LogError("[Singleton] Something went really wrong " +
                            //  " - there should never be more than 1 singleton!" +
                            //  " Reopening the scene might fix it.");
                            return _instance;
                        }

                        if (_instance == null)
                        {
                            GameObject singleton = new GameObject();
                            _instance = singleton.AddComponent&lt;T&gt;();
                            singleton.name = "(singleton) " + typeof(T).ToString();

                            DontDestroyOnLoad(singleton);

                            //Debug.Log("[Singleton] An instance of " + typeof(T) +
                            //  " is needed in the scene, so '" + singleton +
                            //  "' was created with DontDestroyOnLoad.");
                        }
                        else
                        {
                            //Debug.Log("[Singleton] Using instance already created: " +
                            //  _instance.gameObject.name);
                        }
                    }

                    return _instance;
                }
            }
        }

        private static bool applicationIsQuitting = false;

        /// &lt;summary&gt;
        /// When Unity quits, it destroys objects in a random order.
        /// In principle, a Singleton is only destroyed when application quits.
        /// If any script calls Instance after it have been destroyed, 
        ///   it will create a buggy ghost object that will stay on the Editor scene
        ///   even after stopping playing the Application. Really bad!
        /// So, this was made to be sure we're not creating that buggy ghost object.
        /// &lt;/summary&gt;
        public void OnDestroy()
        {
            applicationIsQuitting = true;
        }
    }
}
</code></pre>

<p><strong>ShootingStats class</strong></p>

<pre><code>using UnityEngine;
using System.Collections;
using Project.Statistics;

namespace Project.Statistics
{
    public class ShootingStats : Singleton&lt;ShootingStats&gt;
    {

        private int _onTarget = 0;
        private int _totalShotsFired = 0;

        protected ShootingStats() { }

        public void incrementOnTarget()
        {
            _onTarget++;
        }

        public void incrementTotalShotsFired()
        {
            _totalShotsFired++;
        }

        public void printStats()
        {
            string lines = "Total shots fired: " + _totalShotsFired + "\n" + "Shots on target: " + _onTarget + "\n.";
            Debug.Log(lines);
        }
    }
}
</code></pre>

<p><strong>MethodExtensionForMonoBehaviourTransform Class - not exactly sure what this is</strong></p>

<pre><code>using UnityEngine;

static public class MethodExtensionForMonoBehaviourTransform
{
    /// &lt;summary&gt;
    /// Gets or add a component. Usage example:
    /// BoxCollider boxCollider = transform.GetOrAddComponent&lt;BoxCollider&gt;();
    /// &lt;/summary&gt;
    static public T GetOrAddComponent&lt;T&gt;(this Component child) where T : Component
    {
        T result = child.GetComponent&lt;T&gt;();
        if (result == null)
        {
            result = child.gameObject.AddComponent&lt;T&gt;();
        }
        return result;
    }
}
</code></pre>