// Add textmeshes to the list here
	// Take care to not add twice
	// Never queue in edit mode
	public static void QueueCommit( tk2dTextMesh textMesh ) {
#if UNITY_EDITOR
		if (!Application.isPlaying) {
			textMesh.DoNotUse__CommitInternal();
		}
		else 
#endif
		{
			Instance.QueueCommitInternal( textMesh );
		}
	}
    // Add textmeshes to the list here
    // Take care to not add twice
    // Never queue in edit mode
    public static void QueueCommit(tk2dTextMesh textMesh)
    {
#if UNITY_EDITOR
        if (!Application.isPlaying)
        {
            textMesh.DoNotUse__CommitInternal();
        }
        else
#endif
        {
            Instance.QueueCommitInternal(textMesh);
        }
    }
Esempio n. 3
0
    void FlushQueuesInternal()
    {
        int count = textMeshes.Count;

        for (int i = 0; i < count; ++i)
        {
            tk2dTextMesh tm = textMeshes[i];
            if (tm != null)
            {
                tm.DoNotUse__CommitInternal();
            }
        }
        textMeshes.Clear();
    }
 void FlushQueuesInternal()
 {
     for (int i = 0; i < textMeshes.Count;)
     {
         tk2dTextMesh tm = textMeshes[i];
         if ((tm != null) && (!tm.DoNotUse__CommitInternal()))
         {
             i++;
         }
         else
         {
             textMeshes.RemoveAt(i);
         }
     }
 }