Simplest way to implement DOTween

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
pixel-reverie
Posts: 15
Joined: Sun Oct 13, 2019 12:48 am

Simplest way to implement DOTween

Post 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
User avatar
Tony Li
Posts: 21965
Joined: Thu Jul 18, 2013 1:27 pm

Re: Simplest way to implement DOTween

Post 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().
pixel-reverie
Posts: 15
Joined: Sun Oct 13, 2019 12:48 am

Re: Simplest way to implement DOTween

Post by pixel-reverie »

Thanks Tony!

Will give it a shot!
pixel-reverie
Posts: 15
Joined: Sun Oct 13, 2019 12:48 am

Re: Simplest way to implement DOTween

Post 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.
User avatar
Tony Li
Posts: 21965
Joined: Thu Jul 18, 2013 1:27 pm

Re: Simplest way to implement DOTween

Post by Tony Li »

Thanks! I forgot to mention that.
Post Reply