s&box docs

public sealed class TemporaryEffect : Sandbox.Component

Destroys a GameObject after a number of seconds. If the GameObject or its children have any components that implement ITemporaryEffect we will wait for those to be finished before destroying. This is particularly useful if you want to delete a GameObject but want to wait for sounds or particles to conclude.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 2 methods

public static void CreateOrphans(Sandbox.GameObject gameObject, bool disableLooping = True)

Look at the children in this GameObject and orphan any temporary effects

Parameters

  • disableLooping: Default: True

public virtual void OnParentDestroy()

Metadata

FieldValue
Namespaceglobal
Typeclass
AssemblySandbox.Engine
Doc IDT:TemporaryEffect

On this page