This version of Unity is unsupported.

GarbageCollector

class in UnityEngine.Scripting

/

Implemented in:UnityEngine.CoreModule

Description

Experimental API to control the garbage collector on the Mono and IL2CPP scripting backends.

See GarbageCollector.GCMode for how to change the global garbage collector operation mode.

Static Properties

GCModeSet and get global garbage collector operation mode.

Events

GCModeChangedSubscribe to this event to get notified when GarbageCollector.GCMode changes.