Example #1
0
    /// <summary> Called when object/script activates </summary>
    void Awake()
    {
        if (instance != null)
        {
            throw new UnityException("Singleton instance already exists");
        }
        instance = this;

        myTrans    = transform;
        blendSpeed = 1.0f / blendDuration;
        blendPos   = blendFov = false;
    }
Example #2
0
 void Awake()
 {
     s_Singleton = this;
 }