Esempio n. 1
0
        /// <inheritdoc/>
        internal override void Refresh(Material material)
        {
            bool isAnimated = material.IsAnimated(shaderParam.name);

            if (isAnimated)
            {
                guiCurves.SetCurve(material.GetFloatCurve(shaderParam.name));
            }
            else
            {
                guiConstant.Value = material.GetFloat(shaderParam.name);
            }
        }
Esempio n. 2
0
        /// <inheritdoc/>
        public override InspectableState Refresh(int layoutIndex)
        {
            if (guiField != null)
            {
                guiField.SetCurve(property.GetValue <AnimationCurve>());
            }

            InspectableState oldState = state;

            if (state.HasFlag(InspectableState.Modified))
            {
                state = InspectableState.NotModified;
            }

            return(oldState);
        }