Example #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;
        }
Example #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;
		}