Hum …no thanks ! – Lordinaire

Tag: unity (Page 2 of 7)

[Unity] Visual Studio Tools for Unity 2.0

The Microsoft team in charge of the tooling for Unity has just released version 2.0 of Visual Studio Tools for Unity. For those who do not use Visual Studio as IDE (guys … really ?!), take a few minutes to try this awesome product!

Here is an overview of what you can achieve with this tool:

  • Debug your game on VS (breakpoints, exceptions, …)
  • Create scripts (MonoBehavior …)
  • Errors on the Unity editor are linked to the VS error window
  • Code Coloration for Unity’s shaders (VS 2015 only)
  • Resharper :)

For more information, see the official post :

Have fun!

[Unity] Using Tobii EyeX Controller to interact with your game

Tobii EyeX Controller is an awesome product who give you the power with… your eyes ! I’m not joking, you can control things with your eyes and it works pretty well :) The firm who  product this controller also made a SDK for Unity so let’s play with him !Tobii_Device

How it works ?

With several sensors, the controller is able to track your eyes position to know where you are looking at. You just need to put the device at the bottom of your screen and to calibrate it! Ready to rock ?


Create a new project in Unity  (any recent version will work).

Download the SDK

You can find the SDK here :


 Install the package

Unzip the downloaded file and double click on EyeXFramework.unityPackage. This will open a popup to import the package in your Unity project.

Interactive sphere

Select GameObject > Create Other > Sphere.

On that sphere, we will add 3 components :

  • Gaze Aware (from Tobii SDK)
  • Particle system
  • Custom script to show particles only when you look at the sphere

Gaze Aware

Select the sphere and in the Inspector panel, select Add component > Tobii EyeX > Gaze Aware. This script sets the sphere as reactive to the sensor, we can now know when the player focus the sphere.

Particle system

Select the sphere and in the Inspector panel, select Add component > Effects >Particle System. Set the property Start Lifetime to 1 and disable the property Emission.

Custom script

Once again, select the sphere and in the Inspector panel, select Add component > New script > Csharp > Create and Add. Open the script and copy this code snippet inside :

using UnityEngine;
using System.Collections;

public class ParticleBehavior : MonoBehaviour
	private ParticleSystem _particleComponent;
	private GazeAwareComponent _gazeAwareComponent;

	// Use this for initialization
	void Start ()
		_particleComponent = GetComponent<ParticleSystem>();
		_gazeAwareComponent = GetComponent<GazeAwareComponent>();

	// Update is called once per frame
	void Update ()
		if (_gazeAwareComponent.HasGaze)
			_particleComponent.enableEmission = true;
			_particleComponent.enableEmission = false;

We use the property HasGaze() of GazeAwareComponent to determinate whether the sphere is focus or not. The property enableEmission of the class ParticleSystem is use to active the particle system.



Have fun !

Page 2 of 7

Powered by WordPress & Theme by Anders Norén

%d bloggers like this: