# Animation over GUI Texture

**URL:** https://discussions.unity.com/t/animation-over-gui-texture/432128
**Category:** UI
**Tags:** IMGUI
**Created:** [December 28, 2010, 1:03pm UTC](https://discussions.unity.com/t/animation-over-gui-texture/432128 "2010-12-28T13:03:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_6991559](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@anon\_6991559](https://discussions.unity.com/u/anon_6991559)
#### Post date: [December 28, 2010, 1:03pm UTC](https://discussions.unity.com/t/animation-over-gui-texture/432128/1 "2010-12-28T13:03:41Z")

</div>

I am doing a sliding animation over a gui texture, but for testing purpose as i display it’s pixelInset’s x value (i m sliding horizontally in and out), it’s giving different results everytime !!

say i m starting animation0 from x=910 to x=400 (pixelInset’s x value)  
and another say animation1 from x=400 to x=910 (pixelInset’s x value)

but as i display this x in a label i get values with plus/minus 5 pixels !!  
e.g. 403.1234, 404.1423  
909.2443, 906.3423

this is on mac, but on ipad this is varying in a myriad way

How come animation with fixed starting and ending points takes this variation??

---

<div class="post-metadata">

### Author: ![anon\_95206879](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@anon\_95206879](https://discussions.unity.com/u/anon_95206879)
#### Post date: [December 30, 2010, 3:06am UTC](https://discussions.unity.com/t/animation-over-gui-texture/432128/2 "2010-12-30T03:06:03Z")

</div>

screen resoloution changes between the platforms.

simplest way to explain this is like this.

say you have a screen that’s 1000 pixels across and you tell the gui to appear at 500 dead centre.

then you switch to an iphone 3g with a width of 480, 500 would be off the screen.

---

<div class="post-metadata">

### Author: ![anon\_6991559](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@anon\_6991559](https://discussions.unity.com/u/anon_6991559)
#### Post date: [December 30, 2010, 4:51am UTC](https://discussions.unity.com/t/animation-over-gui-texture/432128/3 "2010-12-30T04:51:13Z")

</div>

Thanks calisk, but the build is for ios (which i have set in build settings) and i’ve already set the game window’s resolution to ipad-wide (1024 x 768) and as mentioned, ipad tells a different story.

So I am using pixelInset property where it’s x component’s values used by me fall in the range (0,1024) both on pc as well as ipad.
