I decided to share some of my general level Unity code on GitHub. Includes code for tweening, singletons, data managing, UI etc. Contains also lots of extension methods.
Use as you wish: for inspiration, copy paste, or just to make you feel better about your own code
Not all of the code is solid or elegant, but I think that at least parts of it can be helpful to someone. Many scripts I’ve been using in many projects, some not very much. Most of it is born with particular requirements in mind, but refactored as general purpose later on.
If you’d like to contribute, feel free to fork the repo or contact me directly.
Unity can serialize them of course, but .Net BinaryFormatter cannot. Trying to serialize unity structs or classes will throw a serialization exception, because they are not marked Serializable. See for example this post . My comments are a bit unclear there, have to consider rewriting them.
Using implicit operators makes it better. Unfortunately, when mapping with Linq Select you have to explicitly cast the types, but don’t see how that could be any other way. Thanks!