/* Using method InvokeOnEndOfFame you can immediate destroy and add components in edtor mode */
class InvokeOnEndOfFameClass() {
void InvokeOnEndOfFame(Action action)
{
StartCoroutine(EnumerableInvokeOnEndOfFame(action));
}
IEnumerator EnumerableInvokeOnEndOfFame(Action action) {
yield return new WaitForEndOfFrame();
action();
}
}