protected override object ApplyPlayableValue(object currentValue, Playable playable, float playableWeight)
            {
                ScriptPlayable <MaterialFloatParamPlayableBehaviour> scriptPlayable = (ScriptPlayable <MaterialFloatParamPlayableBehaviour>)playable;
                MaterialFloatParamPlayableBehaviour inputBehaviour = scriptPlayable.GetBehaviour();

                return(Mathf.Lerp((float)currentValue, inputBehaviour._value, playableWeight));
            }
示例#2
0
            public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
            {
                ScriptPlayable <MaterialFloatParamPlayableBehaviour> playable = ScriptPlayable <MaterialFloatParamPlayableBehaviour> .Create(graph, _data);

                MaterialFloatParamPlayableBehaviour clone = playable.GetBehaviour();

                clone._clip = this;
                return(playable);
            }