Home Forums Software Development Tobii Unity Error Message Reply To: Tobii Unity Error Message

Jenny [Tobii]

Hi Audrey,

Is it possible that you changed some code in the EyeX Framework? This exception is very unusual when using the EyeX Framework as is.

I did the following to try and recreate the issue:
1) created a new Unity project
2) imported the EyeX Unity Package
3) added a UI Button
4) changed the Transition parameter in the Button (script) to Animation, clicked to auto-generate an animation controller, saved the animation
5) added the EyeX Gaze Aware component
6) added a script to the button, same as yours above – except line 7 (no anim member) and instead of line 23 I added a line to print(“Button has eye-gaze”);

Pressing play in the editor, I ended up with an InvalidOperationException: “Could not resolve renderer for game object.”.
This is because the default GazeAware component needs a renderer or box collider on the object it is attached to, to be able to retrieve its bounds on the screen. Otherwise we have no way of automatically extracting where the object is on the screen, and we cannot know if the user is looking at it. (If a renderer/box collider cannot be added to the object, it is possible to get around this by creating your own specialization of the GazeAwareComponent, by overriding either the GetProjectedRect or the GetRenderer method of the EyeXGameObjectInteractorBase class.)

Did you get past this obstacle before getting the exception you describe above?

Which versions are you using for the following?
– Unity
– EyeX Engine
– EyeX SDK for Unity?

(Edit 14 Dec: Added box collider as alternative to renderer)