A Unity Editor extension that searches for null fields in the scene
Unity Null Hunter is an Editor extension I wrote after being spammed with NullReferenceExceptions when I forgot to assign some public variables. It consists of an Editor Window that allows you to add or remove MonoBehaviours to examine, a utility class that holds any null fields found in a particular MonoBehaviour, and a test MonoBehaviour to demonstrate the functionality.
- Copy this into the Assets/Aceade folder.
- Attach the TestScript.cs file to a GameObject, and leave the Target Transform field blank.
- On the main toolbar, click "Tools" -> Aceade -> FindNullRefs.
- When the window opens, add the TestScript MonoBehaviour in the field at the top.
- Click the "Find Null References" button.
MIT Licence (see the attached Licence file)