How the Check Works
The CheckBrokenUnityEvents
is designed to identify and flag Unity events that were set up but no longer appear to work, often due to missing references. This check operates at the GameObject level, inspecting components and their Unity events.
The check performs the following steps:
- Event Discovery: It identifies Unity events within each component attached to a GameObject.
- Event Validation: For each discovered event, it checks if the event is valid by verifying the presence of the target object and the associated method.
- Issue Reporting: If an event is found to be invalid, it logs an issue indicating the type of Unity event and the GameObject where it resides.
When to Use This Check
- Event Verification: To ensure that Unity events within your GameObjects are functioning correctly, preventing issues arising from missing references or non-existent methods.
How to Use the Check
- Configuration: No specific configuration is needed for this check.
- Perform Checks on GameObjects: Attach the
CheckBrokenUnityEvents
component to GameObjects in your scene or prefab. During verification, this check examines Unity events within the GameObject’s components and reports any invalid events it encounters.
Methods
PerformCheck(GameObject gameObject)
: Initiates the verification process for GameObjects. It examines Unity events within the components of the provided GameObject and logs any invalid events.
Attributes
longDescription
: Provides a description of what this check does, explaining its purpose in verifying the functionality of Unity events within your GameObjects.