Пример #1
0
        public override void Reset()
        {
            profile = new PpsProfileReferenceProperty();

            SetEnable   = false;
            EnableValue = false;

            SetMode   = false;
            ModeValue = VignetteMode.Classic;

            SetColor   = false;
            ColorValue = null;

            SetCenter   = false;
            CenterValue = new Vector2(0.5f, 0.5f);

            SetIntensity   = false;
            IntensityValue = 0;

            SetSmoothness   = false;
            SmoothnessValue = 0.2f;

            SetRoundness   = false;
            RoundnessValue = 1;

            SetRounded   = false;
            RoundedValue = false;

            everyFrame = false;
        }
        public override object OnGUI(GUIContent label, object obj, bool isSceneObject, params object[] attributes)
        {
            PpsProfileReferenceProperty _class = obj as PpsProfileReferenceProperty;

            if (_class == null)
            {
                EditorGUILayout.HelpBox("PpsReferenceProperty = null", MessageType.Error);
                return(null);
            }

            EditorGUI.indentLevel++;

            EditField("reference", _class.reference, attributes);

            EditorGUI.indentLevel++;


            PpsProfileReferenceProperty.PpsReferences _ref = _class.reference;

            if (_ref == PpsProfileReferenceProperty.PpsReferences.FromAsset)
            {
                EditField("profile", _class.profile, attributes);
            }

            if (_ref == PpsProfileReferenceProperty.PpsReferences.FromVolume)
            {
                EditField("gameObject", _class.gameObject, attributes);
            }

            EditorGUI.indentLevel--;

            EditField("profileNotFound", _class.profileNotFound, attributes);

            EditorGUI.indentLevel--;

            return(obj);
        }