Exemple #1
0
 void Awake()
 {
     if (Instance)
     {
         Destroy(gameObject);
         return;
     }
     else
     {
         Instance = this;
     }
 }
Exemple #2
0
		void Awake()
		{
			if(Instance)
			{
				Destroy (gameObject);
				return;
			}
			else
			{
				Instance = this;
			}
		}
Exemple #3
0
        void OnWillRenderObject()
        {
            if (!gameObject.activeInHierarchy)
            {
                return;
            }
            Camera currentCam = Camera.current;

            if (TargetingCamera.IsTGPCamera(currentCam))
            {
                UpdateWidth(currentCam, 4);
            }
            else
            {
                UpdateWidth(currentCam, 1);
            }
        }