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.


Topics - VamppiV

Pages: [1]
1
NGUI 3 Support / legacy - what means?
« on: November 10, 2014, 03:18:51 PM »
I know it's strange question, but: what means 'legacy' in NGUI context? I was looking in dictionary (english is not my native language) and was definition about "old, outdated". But in NGUI it means, that's not supported and shouldn't be used in new projects? Or how to understand it?

2
NGUI 3 Support / update atlas from script
« on: October 16, 2014, 08:38:09 AM »
I'm looking for the easiest way to update atlas from script. I have UIAtlas and I want put dynamically new photos in. I was trying PackTextures but I wrapped up.

I want to do something easy like this:

public UIAtlas atlas;
Texture2D snap;

void OnClickedAtlasBlaBla(){
atlas.UPDATE(snap);
}

And I'm looking for something like update function. Any ideas?

3
NGUI 3 Support / How to get and destroy a lot of UITexture from script?
« on: October 13, 2014, 12:41:34 PM »
I have script that make new UITextures when is OnEnable().

Now I'm looking how to get this textures to Destroy them on OnDisable(). It's really important to me to destroy OBJECTS.

My hierarchy:
--Panel (here's my script)
----ScrollView
-------Grid
----------Texture
----------Texture
----------...
----------(here I make new textures objects and this objects I want to completely destroy)

4
NGUI 3 Support / draw call optimization - textures
« on: October 10, 2014, 04:48:42 AM »
I have at my game a lot of textures that are making "from script" (I'm reading photos from disk and make them into texture). Now every texture generate new drawcall - it's very bad option. How can I change it? Any ideas?

5
NGUI 3 Support / NGUI mixed with GUI
« on: October 08, 2014, 09:01:40 AM »
I wonder: s it good practice to mix NGUI and GUI at one scene?
I ask theoretically :)

6
NGUI 3 Support / how attach script to UITexture by script
« on: October 07, 2014, 06:42:24 AM »
How can I attach script to UITexture I've made by script?

I have something like this:

UITexture newTexture;
newTexture = NGUITools.AddWidget<UITexture>(scrollViewObject);
newTexture.SetRect(x,y,texWidth,texHeight);

newTexture.mainTexture=texTmp;

It makes me newTexture in ScrollViewGrid. Now I want to do something like this:
newTexture.AddComponent<UIDragScrollView>();
Of course it doesn't work. So how can I do it better?

7
NGUI 3 Support / photo gallery - how to do?
« on: October 06, 2014, 12:37:14 PM »
Hi :) I'm new on forum (I hope I put this post at good place) and new in NGUI. I have problem, I was trying to do it, but I wasted a lot of time earlier (when I was learning basics) so I decided to ask you for help.

I have to do Photo Gallery. At Android/iOS (if easier, we can focus on Android). Layout similar to this: http://www.techcredo.com/wp-content/uploads/2011/02/quickpic-top-android-image-app-review.jpg

And it's my idea. I hope you tell me is it okey or something I'm thinking wrong.

1. I'm making empty game object. There I have ALBUM CONTROLLER.
2. In ALBUM CONTROLLER I have function that's reading all photos from device and put it into table (first question: how do that?).
3. Next - I'm doing so much GUITextures how I need (count of photos). HOW?
4. And atribute every photo from table to next textures.

It sound in my opinion quite good, but I don't know how to script it.
And, I see, it has one big defect: if I put it in function "Start" it doesn't include new photos (app: camera+photo album). If I put it on Update() it will working all time... So: what function? Maybe when I'm coming into "panel album". But it won't be to slow?

I hope you help me solve my problem. Every idea/tricks will be very helpful. I want to do it good.

(And sorry for my grammar :))

Pages: [1]