Download

Component activated/deactivated blueprint events

Minor quality of life suggestion, but would be super easy to implement:

ActorComponents already have logic built in to enable activation and deactivation consisting of the variables bAutoActivate, bIsActive, and the methods Activate, Deactivate, SetActive, ToggleActive, ShouldActivate.

Working on a component today I found myself in the need of the ability to turn it on and off. I hooked up my logic to check bIsActive before executing, and that was all I needed to let the rest of the activation logic function as it should, which was great.

However, I soon after had the need for the component to execute logic in response to it being activated. I looked for an Activated event to implement but none existed, meaning that I either have to poll bIsActive in Tick (gross) or implement completely separate logic for activation, even though most of it already exists.

I know it’s not a huge deal and easy to work around, but it would certainly make sense to me to have blueprint exposed Activated and Deactivated events just to make this easier.

Thanks :slight_smile:

Hei, this is dated, but did you find any work around for this issue?

It’d be good to know exactly how those work under the hood especially when you mix this in:

Set Component Tick Enabled (ticked / unticked)

Not sure why would you need a workaround, as it has already been implemented:

activated.png