GameLabGraz / Maroon

An interactive and immersive laboratory for Web, PC and VR.
https://maroon.tugraz.at
31 stars 16 forks source link

UnitTests to check for missing UnityEvent methods #552

Closed FlorianGlawogger closed 1 week ago

FlorianGlawogger commented 2 weeks ago

Describe the issue Currently we have unit tests for missing references via this package introduced here #472 However, this package cannot find UnityEvent listeners with missing methods.

Example how such errors might occur: E.g. let's say you connected a button on click event to the method OnButtonClicked() in your script, then you rename that method to OnStartButtonClicked(), now the button cannot find that method anymore. Another example could be that you deleted the object where the script with the method was attached to.

This might look like this (for a Dropdown): grafik or like this: grafik

Proposed solution Write a unit test that checks each experiment scene if any objects have missing methods for UnityEvents (as described here https://stackoverflow.com/questions/42784338/unity-missing-warning-when-button-has-missing-onclick/42788400?noredirect=1)