Skip to content

Instantly share code, notes, and snippets.

View yoshikischmitz's full-sized avatar
🐳
Focusing

Yoshiki Schmitz yoshikischmitz

🐳
Focusing
View GitHub Profile
@yoshikischmitz
yoshikischmitz / UnitySynchronizeInvoke.cs
Created August 29, 2016 04:13 — forked from JakubNei/DeferredSynchronizeInvoke.cs
Implementation of ISynchronizeInvoke for Unity3D game engine. Can be used to invoke anything on main Unity thread. ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well. I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject.
/*
Implementation of ISynchronizeInvoke for Unity3D game engine.
Can be used to invoke anything on main Unity thread.
ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well.
I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject.
help from: http://www.codeproject.com/Articles/12082/A-DelegateQueue-Class
example usage: https://gist.github.com/aeroson/90bf21be3fdc4829e631
license: WTFPL (http://www.wtfpl.net/)