public void ProcessPendingDeletions()
{
if (ObjectsToDelete.Count == 0)
return;
foreach (GameObject ObjectToRundown in ObjectsToDelete)
{
try
{
ObjectToRundown.OnRundown();
}
catch (Exception e)
{
Script.WriteTimestampedLogEntry(String.Format(
"GameObject.ProcessPendingDeletions(): Exception {0} running rundown for object {1} of type {2}.", e, ObjectToRundown.ObjectId, ObjectToRundown.ObjectType));
}
}
//
// Now that we have ran through the object to delete list, clear it
// out (the last reference that the underlying object system has to
// these object ids).
//
ObjectsToDelete.Clear();
}