This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under The Unlicense: https://unlicense.org/ | |
// Source: https://gist.github.com/trs-game-tech/5a1798bcff17360d714819731d83e131 | |
using System; | |
using UnityEngine; | |
using UnityEngine.Events; | |
[Serializable] | |
public sealed class SerializedBooleanDispatcher | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under The Unlicense: https://unlicense.org/ | |
// Source: https://gist.github.com/trs-game-tech/2cee6d912e0f3ac1a9d3d36678763f8b | |
using System; | |
using Cysharp.Threading.Tasks; | |
public static partial class DisposableExtensions | |
{ | |
public static void DisposeNextFrame(this IDisposable disposable) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under The Unlicense: https://unlicense.org/ | |
// Source: https://gist.github.com/trs-game-tech/cc06e39353504800e7230f762a92cf05 | |
using UnityEngine; | |
using UnityEngine.Events; | |
public sealed class BooleanDispatcherComponent : MonoBehaviour | |
{ | |
[SerializeField] private UnityEvent<bool> _onReceive; | |
[SerializeField] private UnityEvent<bool> _onReceiveInvert; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under The Unlicense: https://unlicense.org/ | |
// Source: https://gist.github.com/trs-game-tech/1308737fa567b28b774b227ec7decfc7 | |
using System.Threading; | |
using Cysharp.Threading.Tasks; | |
public static partial class UniTaskCompletionSourceExtensions | |
{ | |
public static UniTask WithCancellation(this UniTaskCompletionSource source, CancellationToken cancellationToken) | |
{ |