Page 1 of 1

Simplest way to implement DOTween

Posted: Wed Nov 20, 2019 2:06 am
by pixel-reverie
Hi,

I would prefer not to use the animator to do my in/out transitions. I would much rather use a tweening library inside a coroutine.

What would be the fastest/simplest way to do this?

Im guessing to make a class inherited from the NPCPanel base class then override some methods. Which would be the correct methods to modify?

Thanks,
Alistair

Re: Simplest way to implement DOTween

Posted: Wed Nov 20, 2019 8:27 am
by Tony Li
Hi,

Make a subclass of StandardUISubtitlePanel that overrides OnVisible() and OnHidden().

In OnVisible(), call base.OnVisible(). When it's done, run your tween.

In OnHidden(), run your tween. When it's done, call base.OnHidden().

Re: Simplest way to implement DOTween

Posted: Wed Nov 20, 2019 8:39 am
by pixel-reverie
Thanks Tony!

Will give it a shot!

Re: Simplest way to implement DOTween

Posted: Wed Nov 20, 2019 8:55 am
by pixel-reverie
Just a note: The StandardUISubtitlePanel uses a custom inspector. So new fields are not going to be visible from the get go.

This can be remedied by creating a custom inspector for the custom UI subtitle panel. Just a heads up to anyone else trying to do something like this.

Re: Simplest way to implement DOTween

Posted: Wed Nov 20, 2019 9:49 am
by Tony Li
Thanks! I forgot to mention that.