This is a repository for the utility functions I have written, both for C++ and C# (Unity) applications.
Unless specified otherwise, this code is provided under the MIT License
Localization
: Editor window for the easy editing of localization files, scripts for loading/displaying the contents of said files. Parts of it depend onEventManager
andIOUtility
, though removing those dependencies is fairly trivial.SceneSwitcher
: Simple script for switching scenes with various basic effects. Parts of it depend onEventManager
, though again removing those dependencies is a matter of removing a few lines.EventManager
: Simple event system. The event manager is a static class to which EventSubscribers subscribe. Objects can then broadcast events, giving them anobject
as a parameterIOUtility
: Simple IO for Unity Mobile. Not asynchronous.RingBuffer
: Barebones ring buffer. Useful for object pooling.Timer
: Barebones timerComputeUtilities
: Some utilities I wrote for Unity compute shader work. Of special interest is theComputeVariable
attribute, which allows the user to write[ComputeVariable] SomeType someName;
and have their variable uploaded to a compute shader every frame. Optional parameters are available to specify which kernel, frequency of update and name should be used.ComputeShaderScript
has a dependency on NaughtyAttributes for one button, but it can be easily removed/replaced.
Logger
: Static class which logs formatted and non-formatted strings to stdoutRenderDocApi
: Simple class to load/communicate with the RenderDoc APIRenderToWindow
: Barebones class to render a bitmap to a window using the Windows API. Has a dependency toLogger
, though again it can be removed easily.vec
: templated vectorN using C++20 conceptssquaremat
: templated matrixNxN using C++20 conceptsBMPWriter
: Function which writes rgba BMPs to a specified file pathDelegate
: Delegate class based on the impossibly fast delegateOptional
: Barebones optional type with no operator overloading (std::optional, I'm looking at you). Essentially amounts to nothing but a wrapper with a bool.RadixSort
: Radix sort implementation I wrote a long time ago. Not too sure about the quality of it, but perhaps it's useful to someoneSerializer
: Serialization classes