I’ve started putting the simple scripts that can be useful in many projects on a github repository, and will keep adding more as time goes on. Hope they help you out!

For now there are 3:

  • DrawForward.cs
    Draw a gizmo line in the direction of the object forward. Can help to easily debug rotation problems and visualize raycasting.
  • CameraRPG2D.cs
    I talked about this script in another article.
  • ToggleLights.cs
    Monobehaviour component that allows you to find all lights of a given type (directional, point…) and toggle them or set them all to a chosen state (on/off).
    I set methods to call this script either using the monobehaviour state values, or you can pass the arguments directly when calling the Monobehaviour object. It also contains an Editor script for easy use in the Editor.

It’s all available on Github, feel free to contribute and stay tuned for more!