Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VertexGradientPlugin Error in Unity 2018.4.5 #5

Open
smkplus opened this issue Jan 26, 2020 · 7 comments
Open

VertexGradientPlugin Error in Unity 2018.4.5 #5

smkplus opened this issue Jan 26, 2020 · 7 comments

Comments

@smkplus
Copy link

smkplus commented Jan 26, 2020

image

Assets/CharTween/Scripts/VertexGradientPlugin.cs(14,18): error CS0534: `CharTween.VertexGradientPlugin' does not implement inherited abstract member `DG.Tweening.Plugins.Core.ABSTweenPlugin<TMPro.VertexGradient,TMPro.VertexGradient,DG.Tweening.Plugins.Options.NoOptions>.SetFrom(DG.Tweening.Core.TweenerCore<TMPro.VertexGradient,TMPro.VertexGradient,DG.Tweening.Plugins.Options.NoOptions>, TMPro.VertexGradient, bool)'

@archgame
Copy link

Adding the following code in the VertexGradientPlugin class, fixed it for me

public override void SetFrom(TweenerCore<VertexGradient, VertexGradient, NoOptions> t, VertexGradient vg, bool isRelative)
        {
            var prevEndVal = t.endValue;
            t.endValue = t.getter();
            t.startValue = isRelative ? Add(t.endValue, prevEndVal) : prevEndVal;
            t.startValue = prevEndVal;
            t.setter(t.startValue);
        }

@LiquidSebbey
Copy link

LiquidSebbey commented Sep 29, 2020

Did not work for me and the latest version of CharTweener gives me this error too. I am running 2019.4.4f1
Getting error:

Assets\CharTween\Scripts\VertexGradientPlugin.cs(14,18): error CS0534: 'VertexGradientPlugin' does not implement inherited abstract member 'ABSTweenPlugin<VertexGradient, VertexGradient, NoOptions>.SetFrom(TweenerCore<VertexGradient, VertexGradient, NoOptions>, VertexGradient, bool, bool)'

@alexpdaniel
Copy link

Try:

public override void SetFrom(TweenerCore<VertexGradient, VertexGradient, NoOptions> t, VertexGradient vg, bool setImmediately, bool isRelative)
{
var prevEndVal = t.endValue;
t.endValue = t.getter();
t.startValue = isRelative ? Add(t.endValue, prevEndVal) : prevEndVal;
t.startValue = prevEndVal;
t.setter(t.startValue);
}

I don't have any idea what the bool "setImmediately" will or won't do in this case, but it will at least get rid of that error and allow you to use CharTweener.

@Lir10
Copy link

Lir10 commented Nov 24, 2020

For me it worked by adding the following:

        public override void SetFrom(TweenerCore<VertexGradient, VertexGradient, NoOptions> t, VertexGradient vg, bool  setImmediately, bool isRelative)
        {
            var prevEndVal = t.endValue;
            t.endValue = t.getter();
            t.startValue = isRelative ? Add(t.endValue, prevEndVal) : prevEndVal;
            t.startValue = prevEndVal;
            t.setter(t.startValue);
        }

        public override void SetFrom(TweenerCore<VertexGradient, VertexGradient, NoOptions> t, bool isRelative)
        {
            var prevEndVal = t.endValue;
            t.endValue = t.getter();
            t.startValue = isRelative ? Add(t.endValue, prevEndVal) : prevEndVal;
            t.startValue = prevEndVal;
            t.setter(t.startValue);
        }

@jomarcenter-mjm
Copy link

is this being fixed unity 2019.4.19 has the same error

@RuolinZheng08
Copy link

For me it worked by adding the following:

        public override void SetFrom(TweenerCore<VertexGradient, VertexGradient, NoOptions> t, VertexGradient vg, bool  setImmediately, bool isRelative)
        {
            var prevEndVal = t.endValue;
            t.endValue = t.getter();
            t.startValue = isRelative ? Add(t.endValue, prevEndVal) : prevEndVal;
            t.startValue = prevEndVal;
            t.setter(t.startValue);
        }

        public override void SetFrom(TweenerCore<VertexGradient, VertexGradient, NoOptions> t, bool isRelative)
        {
            var prevEndVal = t.endValue;
            t.endValue = t.getter();
            t.startValue = isRelative ? Add(t.endValue, prevEndVal) : prevEndVal;
            t.startValue = prevEndVal;
            t.setter(t.startValue);
        }

Thanks! This fixes the issue for me in Unity 2020.3.3f

@NathanOnUnity
Copy link

NathanOnUnity commented Dec 30, 2023

I was having this same issue but what I did was delete the Evaluate and Apply function then added this code in on line 93:

public override void EvaluateAndApply(NoOptions options, Tween t, bool isRelative, DOGetter getter, DOSetter setter, float elapsed, VertexGradient startValue, VertexGradient changeValue, float duration, bool usingInversePosition, int newCompletedSteps, UpdateNotice updateNotice)
{
throw new System.NotImplementedException();
}

This seemed to work for me in Unity Version 2021.3.8f1
The others did not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants