Home › Forums › Software Development › Tobii Unity Error Message
Tagged: Tobii Error Message
- This topic has 1 reply, 2 voices, and was last updated 8 years, 9 months ago by
Jenny [Tobii].
- AuthorPosts
- 04/11/2015 at 10:45 #3689
Audrey Gillies
ParticipantHi 🙂
I’m trying to get an animation to play when I look at a UI button on screen (It enlarges upon gaze to highlight that it’s the one you’re looking at) but whenever I press play in the Unity editor, I get this message :
EyeX query handler failed : Exception of type ‘Tobii.EyeX.Client.InteractionApiException’ was thrown.
What does this mean?
Is it possible that my script calling the animation is wrong and causing a jam? I attached the gaze aware script to the UI Buttons to ensure they were the gaze aware components.
Here is my script :
using UnityEngine; using System.Collections; public class ButtonControl : MonoBehaviour { private GazeAwareComponent _gazeAware; private Animator anim; public GameObject player; // Use this for initialization void Start () { _gazeAware = GetComponent<GazeAwareComponent>(); } // Update is called once per frame void Update () { if (_gazeAware.HasGaze) { GetComponent<Animation>().Play("Button1"); } } }
Any help would be greatly appreciated.
Thank you
Audrey
10/11/2015 at 17:15 #3737Jenny [Tobii]
ParticipantHi 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)
- AuthorPosts
- You must be logged in to reply to this topic.