TemporaryEffectclass

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.

objectComponentTemporaryEffect
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed class TemporaryEffect : Sandbox.Component

Constructors1

Showing 1 constructors

Methods2

Showing 2 methods

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

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

ParameterTypeDescription
gameObjectGameObject
disableLooping = Truebool
Returns:void

public virtual void OnParentDestroy()PUBLICVIRTUALLIFECYCLE

Returns:void

On this page