Skip to content

Commit 0c8fc45

Browse files
author
wanderer
committed
增加EditorCoroutines
1 parent 4592edc commit 0c8fc45

File tree

7 files changed

+488
-0
lines changed

7 files changed

+488
-0
lines changed

GameFramework/Editor/EditorCoroutines.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using System.Collections;
2+
using UnityEditor;
3+
4+
namespace marijnz.EditorCoroutines
5+
{
6+
public static class EditorCoroutineExtensions
7+
{
8+
public static EditorCoroutines.EditorCoroutine StartCoroutine(this EditorWindow thisRef, IEnumerator coroutine)
9+
{
10+
return EditorCoroutines.StartCoroutine(coroutine, thisRef);
11+
}
12+
13+
public static EditorCoroutines.EditorCoroutine StartCoroutine(this EditorWindow thisRef, string methodName)
14+
{
15+
return EditorCoroutines.StartCoroutine(methodName, thisRef);
16+
}
17+
18+
public static EditorCoroutines.EditorCoroutine StartCoroutine(this EditorWindow thisRef, string methodName, object value)
19+
{
20+
return EditorCoroutines.StartCoroutine(methodName, value, thisRef);
21+
}
22+
23+
public static void StopCoroutine(this EditorWindow thisRef, IEnumerator coroutine)
24+
{
25+
EditorCoroutines.StopCoroutine(coroutine, thisRef);
26+
}
27+
28+
public static void StopCoroutine(this EditorWindow thisRef, string methodName)
29+
{
30+
EditorCoroutines.StopCoroutine(methodName, thisRef);
31+
}
32+
33+
public static void StopAllCoroutines(this EditorWindow thisRef)
34+
{
35+
EditorCoroutines.StopAllCoroutines(thisRef);
36+
}
37+
}
38+
}

GameFramework/Editor/EditorCoroutines/EditorCoroutineExtensions.cs.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)