Example #1
0
        public override bool CheckDirty()
        {
            bool withinScreen = SHelper.CheckWithinScreen(position, _losCamera.unityCamera, _radius) || !Application.isPlaying;
            bool dirty        = withinScreen && ((base.CheckDirty() || _radius != _previousRadius || _radius != radius) && radius > 0);

            dirty         = dirty || (withinScreen && !_withinScreen);
            _withinScreen = withinScreen;
            return(dirty);
        }
        public override void OnInspectorGUI()
        {
            var light = (LOSFullScreenLight)target;

            if (!SHelper.CheckWithinScreen(light.transform.position, LOSManager.instance.losCamera.unityCamera, 0))
            {
                EditorGUILayout.HelpBox(
                    "Full Screen Light requires its position within the camera. " +
                    "Otherwise, wired shadow will be present. I'm working on the next version to better solve the issue.",
                    MessageType.Warning);
            }

            base.OnInspectorGUI();

            EditorGUILayout.PropertyField(_invertMode);

            serializedObject.ApplyModifiedProperties();
        }
 public bool CheckWithinScreen()
 {
     return(SHelper.CheckWithinScreen(_trans.position, LOSManager.instance.GetLosCamera(LosCameraIndex).unityCamera, 5));
 }
Example #4
0
        public override bool CheckDirty()
        {
            bool withinScreen = SHelper.CheckWithinScreen(position, LOSManager.instance.losCamera.unityCamera, offScreenDistance) || !Application.isPlaying;

            return(withinScreen && (base.CheckDirty() || gameObject.layer != _previousLayerMask));
        }
        public override bool CheckDirty()
        {
            bool withinScreen = SHelper.CheckWithinScreen(position, LOSManager.instance.losCamera.unityCamera, _radius);

            return(withinScreen && ((base.CheckDirty() || _radius != _previousRadius || _radius != radius) && radius > 0));
        }
Example #6
0
 public override bool CheckDirty()
 {
     return(SHelper.CheckWithinScreen(position, LOSManager.instance.losCamera.unityCamera, offScreenDistance) && (base.CheckDirty() || gameObject.layer != _previousLayerMask));
 }