Esempio n. 1
0
        private void OnEnable()
        {
            if (cameras.Count < 1)
            {
                if (GetComponent <Camera>())
                {
                    cameras.Add(GetComponent <Camera>());
                }
            }

            if (cameras.Count < 1)
            {
                if (Camera.main)
                {
                    cameras.Add(Camera.main);
                }
            }

            if (cameras.Count < 1)
            {
                //Debug.LogError("Camera Shake: No cameras assigned in the inspector!");
            }
            instance = this;
        }
Esempio n. 2
0
		private void OnEnable()
		{
			if (cameras.Count < 1)
			{
				if (GetComponent<Camera>())
					cameras.Add(GetComponent<Camera>());
			}
			
			if (cameras.Count < 1)
			{
				if (Camera.main)
					cameras.Add(Camera.main);
			}
			
			if (cameras.Count < 1)
			{
				Debug.LogError("Camera Shake: No cameras assigned in the inspector!");
			}
			instance = this;
		}