In Actor.h, the lifespan timerhandle has been set to private so we can get the timer information anymore.
I have actor were I need to get the information on their lifespan.
During the conversion, I created a new timerhandle set to the Lifespan function, but I’m fearing side effects like:
1 - Duplicate timer with different timing → so the the lifespan function will be called twice
2 - I have no clue if setting my timer will clear the one defined in the Actor.h and if code rely on it, it may break the code
Could you please confirm if there are some side effect to do this?
Could you please modify the timerhandle to Protected? if no could you please explain the rationals around this decision?
Checking the source code for the promoted branch on GitHub it appears this has already been changed from private to protected. The following commit contains the file where this change occurred. Syncing the commit to your local build should allow you to work with the protected version as you suggested.
Thanks for the information.
It could be great if it is part of the docs as many of us are used of the old method that manage to only have 1 and only 1 timer per function. This can have some side effects for people.
The commit listed above is in the promoted and master branches of GitHub. As such it will likely be integrated into the next major release for the engine. Keep in mind that you can use the link provided to merge just that commit into your source.