Over the years, I have developed a number of mobile games using Unity and have been reusing a number of helper scripts for certain behaviors. I have added those scripts to a public github repository and publishing it via this post.
Repository of useful standalone monobehaviours
This repo is intended for game developers, containing many of the monobehaviours that I use in my own games. Currently, most of these functions are for 2D games. These monobehaviours perform a single function on attached gameobjects making them reusable across projects. Some of this code was written when I was a super noob, please forgive me. Project is built on Unity 2019.2.6f1 Personal but you simply import the scripts folder only. There is also currently 1 static class containing helper functions for GameObjects. The best way to figure out how to use each file is by taking a look at the code itself as each script is small. This repo will be expanded as I work on more projects. Script names are intuitive to their purpose.
The repository contains the following monobehaviours:
- BackgroundRandomizer
- CameraTracksPlayer
- ClickDetector
- ScreenShaker
- SkyIdleRotation
Static Helper Classes
- GameObject
Link: https://github.com/Raziel619/Useful-Unity-MonoBehaviours
Useful-Unity-MonoBehaviours (this link opens in a new window) by Raziel619 (this link opens in a new window)
Repository of useful standalone monobehaviours