You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PlumberUltimateAds/Assets/IronSource/Editor/IronSourceEditorCoroutines.cs

38 lines
751 B
C#

using UnityEditor;
using System.Collections;
public class IronSourceEditorCoroutines
{
readonly IEnumerator mRoutine;
public static IronSourceEditorCoroutines StartEditorCoroutine( IEnumerator routine)
{
IronSourceEditorCoroutines coroutine = new IronSourceEditorCoroutines(routine);
coroutine.start();
return coroutine;
}
IronSourceEditorCoroutines(IEnumerator routine)
{
mRoutine = routine;
}
void start()
{
EditorApplication.update += update;
}
void update()
{
if(!mRoutine.MoveNext())
{
StopEditorCoroutine();
}
}
public void StopEditorCoroutine()
{
EditorApplication.update -= update;
}
}