[Feature Request] Allow SetActive to optionally fade in images via alpha

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

[Feature Request] Allow SetActive to optionally fade in images via alpha

Post by DragoonHP »

What I want to do is, fade in a specific object on the screen. I can do it by attaching an Animator to the object but it becomes quite tedious if it needs to be done for multiple objects. I know another way is to using a CoRoutine and changing the alpha of the image from zero to 1.

Something like

Code: Select all

SetActive(gameObject, 1.0)
where 1.0 is the time it will take the gameObject alpha to increase from 0 to 1
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Feature Request] Allow SetActive to optionally fade in images via alpha

Post by Tony Li »

Hi,

This isn't possible to do in a general case. UI elements can fade in at least one of two different ways (Canvas Groups or Image alpha), and non-UI elements may not be able to fade at all.

You could write a custom sequencer command that covers the cases you need. It's probably easier than writing a different script with a coroutine.
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Re: [Feature Request] Allow SetActive to optionally fade in images via alpha

Post by DragoonHP »

Okay :)
Post Reply