void OnGUI() { int c = WiiMote.wiimote_count(); for (int i = 0; i <= c - 1; i++) { float ir_x = WiiMote.wiimote_getIrX(Configuration.pointerWiiMote); float ir_y = WiiMote.wiimote_getIrY(Configuration.pointerWiiMote); if ((ir_x != -100) && (ir_y != -100)) { float temp_x = ((ir_x + (float)1.0) / (float)2.0) * (float)Screen.width; float temp_y = (float)Screen.height - (((ir_y + (float)1.0) / (float)2.0) * (float)Screen.height); temp_x = Mathf.RoundToInt(temp_x); temp_y = Mathf.RoundToInt(temp_y); GUI.DrawTexture(new Rect(temp_x, temp_y, 64, 64), mira, ScaleMode.ScaleToFit, true, 1.0F); } } }