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 - Spacez

Pages: [1] 2
1
NGUI 3 Support / Re: using too much memory app crashes in iOS
« on: January 15, 2014, 01:56:25 AM »
Only Loading the need UI when need instead of load all UI in once.

i have no idea how to load just some UIs. I'm newbie here :(



You are likely using huge atlases, and crash because of excessive texture memory usage.

so i need to delete all the atlases and re-create them all ?
if i remove some pictures from atlas and create them using UItexture, does the memory consuming the same ?
i have 4-5 atlases and all of them is not larger than 2048 (some 512, some 1024, and some 2048 though), is that not good enough ?

i think i'm doing something wrong, but don't know what it is. Could you please suggest or elaborate :'(



Thanks so much for all your help.

2
NGUI 3 Support / using too much memory app crashes in iOS
« on: January 14, 2014, 07:55:02 AM »
i'm using NGUI creating a game. In my world scene, i create every page of my game using NGUI and group them in using empty gameobject (as in picture, in each group there are many widgets of the page).

by setting 'setactive' in each group in can swap between each page in my game (i.e. from world to shop).

the problem is there are so many widgets in this 'scene' when i build my game to iOS and try running it using iPad mini and iPhone4, the app crashes when loading this scene.

i got this problem before but not with NGUI so it can be solved by delaying the creation of the objects in my code.
btw, i have no idea with the NGUI problem i'm having now because when i use NGUI i created things using drag&drop in Unity Editor not by the code, that's why i dont know how to delay the instantiation of the objects.

is there any ways to solve this ?
Thank you so much for every help.

Spacez

3
NGUI 3 Support / Re: problems with reusing tween scripts
« on: November 23, 2013, 06:05:55 AM »
changed to Solid Color with Alpha 255 and it works !
Thanks again :D



about another problem

Quote
1.)
i'm make a game to Android and iOS
i built my game to test in many Android devices (many different specs) such as Galaxy Nexus, S2, Nexus 7, Nexus 5. All of them can run the game (though most of them are having lag issue in GameScene except Nexus 5)
the problem is, when i build my game to iOS and test them in iPad Mini and iPad2, my game crashes after loading from WorldScene to GameScene.
I guess the reason is about memory usage (?), or is there any possibles causes ?


you mentioned "without any kind of stack trace regarding where it crashes, I can't help you much." 
how can i get those information ?


about memory issue, i have my World Scene created using NGUI. I create every page (such as ranking page, shop page, option, etc) in this Scene by 'setactive' some of them to false, some to true.
is the problem occurs because i have every thing instantiated at the same time ? if so, how can i deal with it ?



4
NGUI 3 Support / Re: problems with reusing tween scripts
« on: November 22, 2013, 09:56:14 AM »
sorry, here is the picture of problem 2.)


btw, where is the 'main camera's clear color's alpha' ?

5
NGUI 3 Support / Re: problems with reusing tween scripts
« on: November 21, 2013, 09:40:07 AM »
it works! Thanks ArenMook :D


can i ask two more questions (so that i dont have to create more new topics)
1.)
i'm make a game to Android and iOS
i built my game to test in many Android devices (many different specs) such as Galaxy Nexus, S2, Nexus 7, Nexus 5. All of them can run the game (though most of them are having lag issue in GameScene except Nexus 5)
the problem is, when i build my game to iOS and test them in iPad Mini and iPad2, my game crashes after loading from WorldScene to GameScene.
I guess the reason is about memory usage (?), or is there any possibles causes ?  :-\

2.)
as i mentioned about testing the game in many Android devices and it works well in WorldScene except in Nexus 5 (the best spec of all devices) textures are messed up and duplicated (see my attachment).


Is there any ways to fix them (both problems) ?



Thanks again and really appreciate in your help,
Spacez

6
NGUI 3 Support / problems with reusing tween scripts
« on: November 19, 2013, 11:03:22 AM »
i'm using some tween scripts -- Tween Position, Tween Alpha, Tween Rotation

they work well for the first time i trigger them (for example, when the player lost his hp the tween will be triggered by setting 'enabled'). After the tweens finished, i disable all of them including set the gameobject's 'setactive' to false (in order to hide the missing hp, a heart).

the problem is my game can be continued after the player lost all the hearts. By doing this, i set all of the hearts' setactive to true. And when the player lost his heart again, i do the same thing as i did in the first -- set 'enabled' to true for all Tween scripts. But when i set the enabled to trigger the tweens, the tweens dont work as it should (it should go smoothly from the starting position to the target position), they change the position immediately after the duration. (the problem happens with all the Tweens -- position, rotation, alpha)

here is a picture of my Tween setting.



am i doing something wrong ? :(


Thanks for all the help

7
thanks for reply Nicki,

the problem has been SOLVED :)

here is what i did (in fact i missed such a simple point :( )

- i tried update my NGUI from 2.6.3 to 2.7.0 and there is 'depth sort' option enabled for me.
- as i told that, i'm creating many sets of background bundle using code (by changing widget sprite name), BUT i forgot that each of the bundle hasnt been created under the same PANEL. (i guess that is the point which NGUI confuses with the depth)
- i added some code so that each bundle will be created under the same panel (which has 'depth sort' enabled'), and the parallel works well !


ps. thanks everyone for the help :)
ps2. marked this thread as solved in case there will be someone having the same problem.

8
bump! some help pls ;(

9
sry, forgot to tell that i also tried adjusting depth and z (as your mentioned in FAQ about them), unfortunately it didnt solve the problem :(


in addition, if you see the picture i attached, you may notice that it is just a part of the texture that show in front (while some part of the same texture is behind). so i guess it's not about z and depth ('cause if i adjust it in the wrong way the whole texture should be front or back, not a part of it)


thanks for the help :D

10
i had parallel backgrounds created using Unity Plane + Texture, but i want to reimplement them using NGUI Atlas in order to reduce some Draw Calls.

the problem is when i finished reimplementing using Atlas, then i tested the result and found that some backgrounds on the back sometimes show in the front !

here is what i tried (but didnt solve the problem :( )
- checked that each background is exactly next to each other
- reimplemented again but separating atlas depends on the layer of parallel (the 1st front use 1 atlas, 2nd front use 1 atlas, ...)
- the parallel algorithm i used works well with normal unity plane + texture


Thanks in advanced for every help,

11
hi, i want to create a new plane (using code) with the same texture as the 'Sprite' widget created using NGUI.
I worked with it for some time and what i can get is a whole atlas texture (i use getcomponent<UISprite>().mainTexture ) but cant get the exact texture i really want in the atlas.

is there any ways to do this ?

Thanks for every help :)


-------------------------------------

Another question, how can i use the texture in the atlas for my current 'prefab' ( in my prefab i have texture set for the object but i dont know how to replace the texture with the one in the atlas)

thanks

12
ahhh. sorry for didnt check all the topics in the site  :-[

Thanks so much

13
NGUI 3 Support / widgets' position changed when screen size is changed
« on: August 24, 2013, 11:26:46 AM »
i'm using NGUI's camera as the second camera to create something like HUD. But, when the screen size is changed the position of widgets are all changed (maybe the absolute position is the same but the relative position to the screen is changed, imo)

is there any ways to solve this ?
Thanks.


here is the picture illustrated


14
i meant 2000 is too large ? 1000 is too large ? 500 is too large ?

15
how can i know how large the texture should be ?
can i just set the Format in the texture's inspector ? (now it's 'Truecolor')

after son searching i found some suggest the DXT5, is it ok ?


ps. i tried change the setting in the Build Setting (override compress) to DXT, but the problem persist (what is the differences between Compress in Build Setting and in Textures's inspector ?


Thanks :)

Pages: [1] 2