Start a new topic
Solved

Cannot select methods for events in Unity inspector

Unity: 2019.2.5f1

Wikitude: 8.7.0


I'm creating a new cloud-based project modeled on the ContinuousRecognition sample included with the Wikitude SDK. However, I cannot assign methods like "OnRecognitionResponse" to my CloudTracker in the Unity Inspector because it doesn't show up in the dropdown list for the event. It seems that parameters to methods must be of type int, float, bool, string, or Object in order to show up in the drop-down list. As an example, my OnRecognitionResponse method has a parameter of type CloudRecognitionServiceResponse.


If I remove the parameter in the script, I can then choose the method in the Inspector from the dropdown list for the "On Recognition Response" event. Then if I change the parameter back to its intended type in the script, it appears as "<Missing MyScript.OnRecognitionResponse>" in the Inspector. It still seems to work, however, when I run the app.


Is this a bug in this Unity version? Or is there some sort of work-around? It seems logical that the user should be able to choose the method from the script that corresponds to the CloudTracker event, regardless of parameter type.

1 Comment

Solution: a regression was introduced in Unity version 2019.2.5f1and later that causes this issue. It's already fixed in the 2019.3.b and 2020.1.a versions. Downgrading to 2019.2.4f1 will also fix the issue. From what I've read, a backport for 2019.2 is current under review.

Login or Signup to post a comment