├── .gitignore ├── Assets ├── EditorCoroutines.meta └── EditorCoroutines │ ├── Editor.meta │ ├── Editor │ ├── CoroutineWindowExample.cs │ ├── CoroutineWindowExample.cs.meta │ ├── EditorCoroutineExtensions.cs │ ├── EditorCoroutineExtensions.cs.meta │ ├── EditorCoroutines.cs │ └── EditorCoroutines.cs.meta │ ├── Readme - v1.1.0.txt │ └── Readme - v1.1.0.txt.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | /Assets/Promo Assets* 8 | 9 | # Visual Studio 2015 cache directory 10 | /.vs/ 11 | 12 | # Autogenerated VS/MD/Consulo solution and project files 13 | ExportedObj/ 14 | .consulo/ 15 | *.csproj 16 | *.unityproj 17 | *.sln 18 | *.suo 19 | *.tmp 20 | *.user 21 | *.userprefs 22 | *.pidb 23 | *.booproj 24 | *.svd 25 | *.pdb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | 30 | # Unity3D Generated File On Crash Reports 31 | sysinfo.txt 32 | 33 | # Builds 34 | *.apk 35 | *.unitypackage 36 | -------------------------------------------------------------------------------- /Assets/EditorCoroutines.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 779a43f2d8da14e35ad4145d80df2867 3 | folderAsset: yes 4 | timeCreated: 1509206152 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18907cecf3cafcb4c964b6573ea6956e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Editor/CoroutineWindowExample.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using UnityEditor; 4 | 5 | namespace marijnz.EditorCoroutines 6 | { 7 | public class CoroutineWindowExample : EditorWindow 8 | { 9 | [MenuItem("Window/Coroutine Example")] 10 | public static void ShowWindow() 11 | { 12 | EditorWindow.GetWindow(typeof(CoroutineWindowExample)); 13 | } 14 | 15 | void OnGUI() 16 | { 17 | if (GUILayout.Button("Start")) 18 | { 19 | this.StartCoroutine(Example()); 20 | } 21 | 22 | if (GUILayout.Button("Start WWW")) 23 | { 24 | this.StartCoroutine(ExampleWWW()); 25 | } 26 | 27 | if (GUILayout.Button("Start Nested")) 28 | { 29 | this.StartCoroutine(ExampleNested()); 30 | } 31 | 32 | if (GUILayout.Button("Stop")) 33 | { 34 | this.StopCoroutine("Example"); 35 | } 36 | if (GUILayout.Button("Stop all")) 37 | { 38 | this.StopAllCoroutines(); 39 | } 40 | 41 | if (GUILayout.Button("Also")) 42 | { 43 | this.StopAllCoroutines(); 44 | } 45 | 46 | if (GUILayout.Button("WaitUntil/WaitWhile")) 47 | { 48 | status = false; 49 | this.StartCoroutine(ExampleWaitUntilWhile()); 50 | } 51 | 52 | if (GUILayout.Button("Switch For WaitUntil/WaitWhile:" + (status ? "On" : "Off"))) 53 | { 54 | status = !status; 55 | EditorUtility.SetDirty(this); 56 | } 57 | } 58 | 59 | private bool status; 60 | 61 | IEnumerator ExampleWaitUntilWhile() 62 | { 63 | yield return new WaitUntil(()=>status); 64 | Debug.Log("Switch On"); 65 | yield return new WaitWhile(()=>status); 66 | Debug.Log("Switch Off"); 67 | } 68 | 69 | IEnumerator Example() 70 | { 71 | while (true) 72 | { 73 | Debug.Log("Hello EditorCoroutine!"); 74 | yield return new WaitForSeconds(2f); 75 | } 76 | } 77 | 78 | IEnumerator ExampleWWW() 79 | { 80 | while (true) 81 | { 82 | var www = new WWW("https://unity3d.com/"); 83 | yield return www; 84 | Debug.Log("Hello EditorCoroutine!" + www.text); 85 | yield return new WaitForSeconds(2f); 86 | } 87 | } 88 | 89 | IEnumerator ExampleNested() 90 | { 91 | while (true) 92 | { 93 | yield return new WaitForSeconds(2f); 94 | Debug.Log("I'm not nested"); 95 | yield return this.StartCoroutine(ExampleNestedOneLayer()); 96 | } 97 | } 98 | 99 | IEnumerator ExampleNestedOneLayer() 100 | { 101 | yield return new WaitForSeconds(2f); 102 | Debug.Log("I'm one layer nested"); 103 | yield return this.StartCoroutine(ExampleNestedTwoLayers()); 104 | } 105 | 106 | IEnumerator ExampleNestedTwoLayers() 107 | { 108 | yield return new WaitForSeconds(2f); 109 | Debug.Log("I'm two layers nested"); 110 | } 111 | 112 | 113 | class NonEditorClass 114 | { 115 | public void DoSomething(bool start, bool stop, bool stopAll) 116 | { 117 | if (start) 118 | { 119 | EditorCoroutines.StartCoroutine(Example(), this); 120 | } 121 | if (stop) 122 | { 123 | EditorCoroutines.StopCoroutine("Example", this); 124 | } 125 | if (stopAll) 126 | { 127 | EditorCoroutines.StopAllCoroutines(this); 128 | } 129 | } 130 | 131 | IEnumerator Example() 132 | { 133 | while (true) 134 | { 135 | Debug.Log("Hello EditorCoroutine!"); 136 | yield return new WaitForSeconds(2f); 137 | } 138 | } 139 | } 140 | } 141 | } -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Editor/CoroutineWindowExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: caa1dd07b967794438fd075628a919a1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Editor/EditorCoroutineExtensions.cs: -------------------------------------------------------------------------------- 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 | } -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Editor/EditorCoroutineExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95b768ffdf1ab014dbe006683b8e190d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Editor/EditorCoroutines.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using UnityEditor; 4 | using System.Collections.Generic; 5 | using System; 6 | using System.Reflection; 7 | 8 | namespace marijnz.EditorCoroutines 9 | { 10 | public class EditorCoroutines 11 | { 12 | public class EditorCoroutine 13 | { 14 | public ICoroutineYield currentYield = new YieldDefault(); 15 | public IEnumerator routine; 16 | public string routineUniqueHash; 17 | public string ownerUniqueHash; 18 | public string MethodName = ""; 19 | 20 | public int ownerHash; 21 | public string ownerType; 22 | 23 | public bool finished = false; 24 | 25 | public EditorCoroutine(IEnumerator routine, int ownerHash, string ownerType) 26 | { 27 | this.routine = routine; 28 | this.ownerHash = ownerHash; 29 | this.ownerType = ownerType; 30 | ownerUniqueHash = ownerHash + "_" + ownerType; 31 | 32 | if (routine != null) 33 | { 34 | string[] split = routine.ToString().Split('<', '>'); 35 | if (split.Length == 3) 36 | { 37 | this.MethodName = split[1]; 38 | } 39 | } 40 | 41 | routineUniqueHash = ownerHash + "_" + ownerType + "_" + MethodName; 42 | } 43 | 44 | public EditorCoroutine(string methodName, int ownerHash, string ownerType) 45 | { 46 | MethodName = methodName; 47 | this.ownerHash = ownerHash; 48 | this.ownerType = ownerType; 49 | ownerUniqueHash = ownerHash + "_" + ownerType; 50 | routineUniqueHash = ownerHash + "_" + ownerType + "_" + MethodName; 51 | } 52 | } 53 | 54 | public interface ICoroutineYield 55 | { 56 | bool IsDone(float deltaTime); 57 | } 58 | 59 | struct YieldDefault : ICoroutineYield 60 | { 61 | public bool IsDone(float deltaTime) 62 | { 63 | return true; 64 | } 65 | } 66 | 67 | struct YieldWaitForSeconds : ICoroutineYield 68 | { 69 | public float timeLeft; 70 | 71 | public bool IsDone(float deltaTime) 72 | { 73 | timeLeft -= deltaTime; 74 | return timeLeft < 0; 75 | } 76 | } 77 | 78 | struct YieldCustomYieldInstruction : ICoroutineYield 79 | { 80 | public CustomYieldInstruction customYield; 81 | 82 | public bool IsDone(float deltaTime) 83 | { 84 | return !customYield.keepWaiting; 85 | } 86 | } 87 | 88 | struct YieldWWW : ICoroutineYield 89 | { 90 | public WWW Www; 91 | 92 | public bool IsDone(float deltaTime) 93 | { 94 | return Www.isDone; 95 | } 96 | } 97 | 98 | struct YieldAsync : ICoroutineYield 99 | { 100 | public AsyncOperation asyncOperation; 101 | 102 | public bool IsDone(float deltaTime) 103 | { 104 | return asyncOperation.isDone; 105 | } 106 | } 107 | 108 | struct YieldNestedCoroutine : ICoroutineYield 109 | { 110 | public EditorCoroutine coroutine; 111 | 112 | public bool IsDone(float deltaTime) 113 | { 114 | return coroutine.finished; 115 | } 116 | } 117 | 118 | static EditorCoroutines instance = null; 119 | 120 | Dictionary> coroutineDict = new Dictionary>(); 121 | List> tempCoroutineList = new List>(); 122 | 123 | Dictionary> coroutineOwnerDict = 124 | new Dictionary>(); 125 | 126 | DateTime previousTimeSinceStartup; 127 | 128 | /// Starts a coroutine. 129 | /// The coroutine to start. 130 | /// Reference to the instance of the class containing the method. 131 | public static EditorCoroutine StartCoroutine(IEnumerator routine, object thisReference) 132 | { 133 | CreateInstanceIfNeeded(); 134 | return instance.GoStartCoroutine(routine, thisReference); 135 | } 136 | 137 | /// Starts a coroutine. 138 | /// The name of the coroutine method to start. 139 | /// Reference to the instance of the class containing the method. 140 | public static EditorCoroutine StartCoroutine(string methodName, object thisReference) 141 | { 142 | return StartCoroutine(methodName, null, thisReference); 143 | } 144 | 145 | /// Starts a coroutine. 146 | /// The name of the coroutine method to start. 147 | /// The parameter to pass to the coroutine. 148 | /// Reference to the instance of the class containing the method. 149 | public static EditorCoroutine StartCoroutine(string methodName, object value, object thisReference) 150 | { 151 | MethodInfo methodInfo = thisReference.GetType() 152 | .GetMethod(methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); 153 | if (methodInfo == null) 154 | { 155 | Debug.LogError("Coroutine '" + methodName + "' couldn't be started, the method doesn't exist!"); 156 | } 157 | object returnValue; 158 | 159 | if (value == null) 160 | { 161 | returnValue = methodInfo.Invoke(thisReference, null); 162 | } 163 | else 164 | { 165 | returnValue = methodInfo.Invoke(thisReference, new object[] {value}); 166 | } 167 | 168 | if (returnValue is IEnumerator) 169 | { 170 | CreateInstanceIfNeeded(); 171 | return instance.GoStartCoroutine((IEnumerator) returnValue, thisReference); 172 | } 173 | else 174 | { 175 | Debug.LogError("Coroutine '" + methodName + "' couldn't be started, the method doesn't return an IEnumerator!"); 176 | } 177 | 178 | return null; 179 | } 180 | 181 | /// Stops all coroutines being the routine running on the passed instance. 182 | /// The coroutine to stop. 183 | /// Reference to the instance of the class containing the method. 184 | public static void StopCoroutine(IEnumerator routine, object thisReference) 185 | { 186 | CreateInstanceIfNeeded(); 187 | instance.GoStopCoroutine(routine, thisReference); 188 | } 189 | 190 | /// 191 | /// Stops all coroutines named methodName running on the passed instance. 192 | /// The name of the coroutine method to stop. 193 | /// Reference to the instance of the class containing the method. 194 | public static void StopCoroutine(string methodName, object thisReference) 195 | { 196 | CreateInstanceIfNeeded(); 197 | instance.GoStopCoroutine(methodName, thisReference); 198 | } 199 | 200 | /// 201 | /// Stops all coroutines running on the passed instance. 202 | /// Reference to the instance of the class containing the method. 203 | public static void StopAllCoroutines(object thisReference) 204 | { 205 | CreateInstanceIfNeeded(); 206 | instance.GoStopAllCoroutines(thisReference); 207 | } 208 | 209 | static void CreateInstanceIfNeeded() 210 | { 211 | if (instance == null) 212 | { 213 | instance = new EditorCoroutines(); 214 | instance.Initialize(); 215 | } 216 | } 217 | 218 | void Initialize() 219 | { 220 | previousTimeSinceStartup = DateTime.Now; 221 | EditorApplication.update += OnUpdate; 222 | } 223 | 224 | void GoStopCoroutine(IEnumerator routine, object thisReference) 225 | { 226 | GoStopActualRoutine(CreateCoroutine(routine, thisReference)); 227 | } 228 | 229 | void GoStopCoroutine(string methodName, object thisReference) 230 | { 231 | GoStopActualRoutine(CreateCoroutineFromString(methodName, thisReference)); 232 | } 233 | 234 | void GoStopActualRoutine(EditorCoroutine routine) 235 | { 236 | if (coroutineDict.ContainsKey(routine.routineUniqueHash)) 237 | { 238 | coroutineOwnerDict[routine.ownerUniqueHash].Remove(routine.routineUniqueHash); 239 | coroutineDict.Remove(routine.routineUniqueHash); 240 | } 241 | } 242 | 243 | void GoStopAllCoroutines(object thisReference) 244 | { 245 | EditorCoroutine coroutine = CreateCoroutine(null, thisReference); 246 | if (coroutineOwnerDict.ContainsKey(coroutine.ownerUniqueHash)) 247 | { 248 | foreach (var couple in coroutineOwnerDict[coroutine.ownerUniqueHash]) 249 | { 250 | coroutineDict.Remove(couple.Value.routineUniqueHash); 251 | } 252 | coroutineOwnerDict.Remove(coroutine.ownerUniqueHash); 253 | } 254 | } 255 | 256 | EditorCoroutine GoStartCoroutine(IEnumerator routine, object thisReference) 257 | { 258 | if (routine == null) 259 | { 260 | Debug.LogException(new Exception("IEnumerator is null!"), null); 261 | } 262 | EditorCoroutine coroutine = CreateCoroutine(routine, thisReference); 263 | GoStartCoroutine(coroutine); 264 | return coroutine; 265 | } 266 | 267 | void GoStartCoroutine(EditorCoroutine coroutine) 268 | { 269 | if (!coroutineDict.ContainsKey(coroutine.routineUniqueHash)) 270 | { 271 | List newCoroutineList = new List(); 272 | coroutineDict.Add(coroutine.routineUniqueHash, newCoroutineList); 273 | } 274 | coroutineDict[coroutine.routineUniqueHash].Add(coroutine); 275 | 276 | if (!coroutineOwnerDict.ContainsKey(coroutine.ownerUniqueHash)) 277 | { 278 | Dictionary newCoroutineDict = new Dictionary(); 279 | coroutineOwnerDict.Add(coroutine.ownerUniqueHash, newCoroutineDict); 280 | } 281 | 282 | // If the method from the same owner has been stored before, it doesn't have to be stored anymore, 283 | // One reference is enough in order for "StopAllCoroutines" to work 284 | if (!coroutineOwnerDict[coroutine.ownerUniqueHash].ContainsKey(coroutine.routineUniqueHash)) 285 | { 286 | coroutineOwnerDict[coroutine.ownerUniqueHash].Add(coroutine.routineUniqueHash, coroutine); 287 | } 288 | 289 | MoveNext(coroutine); 290 | } 291 | 292 | EditorCoroutine CreateCoroutine(IEnumerator routine, object thisReference) 293 | { 294 | return new EditorCoroutine(routine, thisReference.GetHashCode(), thisReference.GetType().ToString()); 295 | } 296 | 297 | EditorCoroutine CreateCoroutineFromString(string methodName, object thisReference) 298 | { 299 | return new EditorCoroutine(methodName, thisReference.GetHashCode(), thisReference.GetType().ToString()); 300 | } 301 | 302 | void OnUpdate() 303 | { 304 | float deltaTime = (float) (DateTime.Now.Subtract(previousTimeSinceStartup).TotalMilliseconds / 1000.0f); 305 | 306 | previousTimeSinceStartup = DateTime.Now; 307 | if (coroutineDict.Count == 0) 308 | { 309 | return; 310 | } 311 | 312 | tempCoroutineList.Clear(); 313 | foreach (var pair in coroutineDict) 314 | tempCoroutineList.Add(pair.Value); 315 | 316 | for (var i = tempCoroutineList.Count - 1; i >= 0; i--) 317 | { 318 | List coroutines = tempCoroutineList[i]; 319 | 320 | for (int j = coroutines.Count - 1; j >= 0; j--) 321 | { 322 | EditorCoroutine coroutine = coroutines[j]; 323 | 324 | if (!coroutine.currentYield.IsDone(deltaTime)) 325 | { 326 | continue; 327 | } 328 | 329 | if (!MoveNext(coroutine)) 330 | { 331 | coroutines.RemoveAt(j); 332 | coroutine.currentYield = null; 333 | coroutine.finished = true; 334 | } 335 | 336 | if (coroutines.Count == 0) 337 | { 338 | coroutineDict.Remove(coroutine.routineUniqueHash); 339 | } 340 | } 341 | } 342 | } 343 | 344 | static bool MoveNext(EditorCoroutine coroutine) 345 | { 346 | if (coroutine.routine.MoveNext()) 347 | { 348 | return Process(coroutine); 349 | } 350 | 351 | return false; 352 | } 353 | 354 | // returns false if no next, returns true if OK 355 | static bool Process(EditorCoroutine coroutine) 356 | { 357 | object current = coroutine.routine.Current; 358 | if (current == null) 359 | { 360 | coroutine.currentYield = new YieldDefault(); 361 | } 362 | else if (current is WaitForSeconds) 363 | { 364 | float seconds = float.Parse(GetInstanceField(typeof(WaitForSeconds), current, "m_Seconds").ToString()); 365 | coroutine.currentYield = new YieldWaitForSeconds() {timeLeft = seconds}; 366 | } 367 | else if (current is CustomYieldInstruction) 368 | { 369 | coroutine.currentYield = new YieldCustomYieldInstruction() 370 | { 371 | customYield = current as CustomYieldInstruction 372 | }; 373 | } 374 | else if (current is WWW) 375 | { 376 | coroutine.currentYield = new YieldWWW {Www = (WWW) current}; 377 | } 378 | else if (current is WaitForFixedUpdate || current is WaitForEndOfFrame) 379 | { 380 | coroutine.currentYield = new YieldDefault(); 381 | } 382 | else if (current is AsyncOperation) 383 | { 384 | coroutine.currentYield = new YieldAsync {asyncOperation = (AsyncOperation) current}; 385 | } 386 | else if (current is EditorCoroutine) 387 | { 388 | coroutine.currentYield = new YieldNestedCoroutine { coroutine= (EditorCoroutine) current}; 389 | } 390 | else 391 | { 392 | Debug.LogException( 393 | new Exception("<" + coroutine.MethodName + "> yielded an unknown or unsupported type! (" + current.GetType() + ")"), 394 | null); 395 | coroutine.currentYield = new YieldDefault(); 396 | } 397 | return true; 398 | } 399 | 400 | static object GetInstanceField(Type type, object instance, string fieldName) 401 | { 402 | BindingFlags bindFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static; 403 | FieldInfo field = type.GetField(fieldName, bindFlags); 404 | return field.GetValue(instance); 405 | } 406 | } 407 | } 408 | -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Editor/EditorCoroutines.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cec648b627d814c59a9dfbb78414ec11 3 | timeCreated: 1509203690 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Readme - v1.1.0.txt: -------------------------------------------------------------------------------- 1 | EditorCoroutines by Marijn Zwemmer 2 | 3 | Use Coroutines in the Editor like you're used to, examples are in CoroutineWindowExample.cs. -------------------------------------------------------------------------------- /Assets/EditorCoroutines/Readme - v1.1.0.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 585d67c05cd29474a9b21ea99ff2cd03 3 | timeCreated: 1509206155 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Marijn Zwemmer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.1.0p5 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marijnz/unity-editor-coroutines/f16d53b344a0c93f581eda2437b07f4a4dc5579a/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # unity-editor-coroutines 2 | Coroutines for Editor scripts, just like regular coroutines 3 | 4 | Also on the Unity Asset Store: https://www.assetstore.unity3d.com/en/#!/content/27373 5 | --------------------------------------------------------------------------------