Skip to content

Instantly share code, notes, and snippets.

View REDIZIT's full-sized avatar

REDIZIT REDIZIT

  • Russia, Saint-Petersburg
View GitHub Profile
@japhib
japhib / CoroutineUtils.cs
Last active June 20, 2025 07:35
How to call a Unity coroutine within a try/catch block
using UnityEngine;
using System.Collections;
// Adapted from https://jacksondunstan.com/articles/3718
public static class CoroutineUtils
{
// Calls a coroutine but if there's an error in that coroutine, it'll log the error & return
// instead of just killing the caller.
//
// Call it like this: