Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - triggly_glix

Pages: [1]
1
NGUI 3 Support / Re: Event for Show & Hide Keyboard
« on: February 12, 2014, 07:58:54 AM »
Hmm... i'm still seeing this exact problem - was it ever solved?
thanks...

2
In an attempt to make this nice and clear - here's a very short video of the behaviour -
what i am ultimately trying to achieve is just loading in atlases at different resolutions - with this system i have the atlas set to "Tex Coords" as i said - and I'm loading in and out the actual atlas texture. I would also be happy to go the dummy & .replacement technique - but i don't seem to be able to get that to actually remove the unused textures from memory.

so here's what's happening now...
i've tried Refresh on the UIPAnel and MakeItDirty on the UIAtlas but neither of them work -
any help very much appreciated - this is late on in a project where we;ve used NGUI quite heavily (too late to switch to 3 (!))

https://dl.dropboxusercontent.com/u/11634924/NGUI_redraw_problem.mp4

thanks,
Ross

3
Okay thanks - I think this is working now - i do it like this ->

...

atlasScript = (UIAtlas)gameObject.GetComponent(typeof(UIAtlas));
                  
Resources.UnloadAsset(atlasScript.spriteMaterial.mainTexture);
         
atlasScript.spriteMaterial.mainTexture = (Texture2D)Resources.Load ("Ross_Atlases/@iPad2/PigbyBar_Atlas_@2x" );

...

but at this point the sprites on screen get full of garbage - and ONLY once i move something in the editor do they get refreshed and filled up with the new correct texture...

i tried calling panel.Refresh() on their panel straight after the above - but no joy there... any clues ? thanks...


4
Hi,

So i'm not sure why this won't work. I tried creating dummy atlases and using the .replacement feature. that works okay but is a huge work overhead for our project which has more than 100 atlases.
What i basically would like to do is create the atlas at one resolution and then manually replace the texture with a lower res one in code. this works but the texture coordinates for the individual sprites is off. The UIAtlas is set to Tex Coords ... and the scale is uniform so ican't see why this wouldn 't work. Is there some internal storage of the pixel positions of sprites or something, or some call i can call to get NGUI to recalculate whatever it has in there...?

Thanks,
Ross

5
NGUI 3 Support / Re: Atlas layers and sprite order
« on: November 14, 2013, 08:09:49 AM »
thanks -

i've just spent an hour trying to get something very simple along these lines to work -

i'm now moving the gameobjects to another panel when i want them to appear behind the object... and it's still not working

i see it clearly in the editor - i move a sprite on the Z in one panel and sprites that are from the same atlas but in another panel flicker behind and in front of objects...
could this be because i've moved the sprite to a new panel programatically - is there some refresh call i need to let NGUI know i've moved it to another panel and that it should be batched separately?
thanks!
 
just to be clear I've got 2 panels within the same UI widget ... and i'm trying to have some sprites from the same atlas draw in front of and behind an object

6
NGUI 3 Support / Atlas layers and sprite order
« on: October 22, 2013, 06:44:06 AM »
So... I'm running NGUI 2.7 and my basic problem is that if I have two atlases - and i have sprites from Atlas A at the back and then in the middle Atlas B and then in the front more sprites from Atlas A... then all the sprites from Atlas A will be batched into one draw call and will all either be behind or in front of Atlas B...
Is there no way around this at all?
What I would like is that the sprites from Atlas A were split into two draw calls so that the draw order of the scene could be maintained.

thanks...

7
NGUI 3 Support / Re: UIAtlas dummies , resolution support and memory...
« on: October 17, 2013, 02:54:04 AM »
Yes -
actually got that to work -
so like this basically -

[ExecuteInEditMode]
public class SetupAtlasResolutions : MonoBehaviour
{
   
   public GameObject dummyAtlas;
   public GameObject replaceWith;
   
   // Use this for initialization
   void Start ()
   {
      UIAtlas uiatlasDummy = (UIAtlas)dummyAtlas.GetComponent(typeof(UIAtlas));
      UIAtlas uiatlasReplacemet = (UIAtlas)replaceWith.GetComponent(typeof(UIAtlas));

      uiatlasDummy.replacement = uiatlasReplacemet;
   }
}

and then you can use the dummy atlas in the editor and select sprites from the replacement - cool :)

8
NGUI 3 Support / Re: UIAtlas dummies , resolution support and memory...
« on: October 17, 2013, 02:37:06 AM »
Thanks -
I guess what I don't understand in that case - if the dummy atlas has no sprites in it - then how can I set everything up in the editor? I mean - presumably any sprites in my editory are going to have their Atlas set to the dummy - but if that has no sprites in it - how can I choose their sprite.
Or can I somehow set the .replacement value of the atlas in the editor - like before the game runs...? 

9
NGUI 3 Support / UIAtlas dummies , resolution support and memory...
« on: October 16, 2013, 04:23:17 AM »
HI folks,
So I'm about to embark on getting our app sorted for different resolutions. I've read in a few places that NGUI recommends that I use dummy atlases and the .replacement field to point to the real atlas that I want the sprites to be displayed from.
So I just wondered if anybody could help me get this totally clear before I start on it.

So should the process basically be:

I've got an atlas at each resolution that I want to support and also a dummy atlas. This dummy atlas should contain all the same sprites as the real ones but presumably at a very low resolution so that it doesn't use much memory(?)
Then in the editor i assign my sprites from the dummy atlas.

At load time - I unload the .png files for the atlases i'm not using - and load the .png files for the onese that I am - using Resources.Load() ...
possibly then reassigning that png file to the atlas material (at that resolution.)

and then use the .replacement in the dummy atlas to point to the one i have in memory...

that it?
Thanks!



10
NGUI 3 Support / Re: Flickering, disappearing screen & sprites in editor
« on: October 10, 2013, 04:08:27 AM »
Hi Aren,
thanks for responding on this - so I've now updated to NGUI 2.7.0 and I've turned on depth sorting but I'm still seeing similar problems. I could post another video but basically it's the same - things don't appear and then i pause and unpause the app and they are there. For example a popup doesn't reach it's full scale - i pause and unpause and ah, there it is. Or i transition from one menu to another the screen stays black - when i pause and unpause the editor i see that in fact the screen is there...
any more clues please ?
thanks

11
NGUI 3 Support / Re: UISprite Make Pixel Perfect Runtime
« on: September 26, 2013, 11:51:37 AM »
I'm having this same problem -
the sprite is normal - not tiled or sliced... i definitely have the right gameObject - it's just been instantiated - straight after i call MakePixelPerfect on the UISprite but it doesn't work...
ideas?
thanks :)

12
NGUI 3 Support / Flickering, disappearing screen & sprites in editor
« on: September 20, 2013, 05:48:15 AM »
As the subject says sprites are disappearing in the editor when I click play - or at various moments in the interaction. If I pause the editor and then resume playing they come back...
attaching a link to a video to show the problem clearly - (this is happening a lot and is quite affecting my workflow)
any help very much appreciated...

https://dl.dropboxusercontent.com/u/11634924/Unity_NGui_Flickering.mp4

13
NGUI 3 Support / How to stop tweens starting automatically...?
« on: September 18, 2013, 05:14:23 AM »
I have setup various tweens on my NGui sprites... Tweening alpha and position... whenever i start the app the tween automatically happens... and if i have 2 tweens on the same object they both try to happen simultaneously. So if i have one position tween for entering the screen and another for exiting... how can i tell them not to play when the object is first activated... and only to play when i want them to??
the same thing happens for my scale or alpha tweens...
i don't seem to see a PlayOnAwake option that's already set anywhere ?
thanks

Pages: [1]