class MAGES::DeletionQueue

Overview

A queue of actions to be executed on the main thread. More…

class DeletionQueue: public Queue< System.Action >
{
public:
    // methods

    void AttachToGameObjectLifetime(GameObject gameObject);
    void Flush();
};

Detailed Documentation

A queue of actions to be executed on the main thread.

Methods

void AttachToGameObjectLifetime(GameObject gameObject)

Attaches the queue to the lifetime of a GameObject, so that it is flushed when the GameObject is destroyed.

Parameters:

gameObject

The GameObject to which this deletion queue is attached.

void Flush()

Flushes the queue by executing all actions.