Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
        void OnEnable()
        {
            if (mainCamera == null)
            {
                mainCamera = Camera.main;
            }

            // ensure the SpriteLightKitPostProcessor is on the Camera
            _slkImageEffect = mainCamera.GetComponent <SpriteLightKitImageEffect>();
            if (_slkImageEffect == null)
            {
                _slkImageEffect = mainCamera.gameObject.AddComponent <SpriteLightKitImageEffect>();
            }

            prepareCamera();
            updateTexture();
            transform.localPosition = Vector3.zero;
        }
コード例 #2
0
        void OnEnable()
        {
            if( mainCamera == null )
                mainCamera = Camera.main;

            // ensure the SpriteLightKitPostProcessor is on the Camera
            _slkImageEffect = mainCamera.GetComponent<SpriteLightKitImageEffect>();
            if( _slkImageEffect == null )
                _slkImageEffect = mainCamera.gameObject.AddComponent<SpriteLightKitImageEffect>();

            prepareCamera();
            updateTexture();
            transform.localPosition = Vector3.zero;
        }