class TemporaryEffect : Component

robot_2Generated
code_blocksInput

Description

The TemporaryEffect class is responsible for destroying a GameObject after a specified number of seconds. It ensures that if the GameObject or its children have any components implementing ITemporaryEffect, it will wait for those effects to complete before proceeding with the destruction. This functionality is particularly useful for scenarios where you want to remove a GameObject but need to wait for associated sounds or particles to finish.

Members

Static Members

Member NameSummary
CreateOrphansLook at the children in this GameObject and orphan any temporary effects.

Instance Members

Member NameSummary
DestroyAfterSecondsNumber of seconds to wait before destroying.
WaitForChildEffectsIf true, waits for any ITemporaryEffect's to finish before destroying.