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

Pages: [1]
1
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

2
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

3
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,

4
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

5
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


6
first, i'm making the project in Unity using NGUI. When i click play and test my project in Unity everything works fine i can see every UI, also everything can do what i want.


Then i try building the project to Android after finished building and install .apk into my android phone
here are the problems

IN ANDROID PHONE
- only some texts and planes are shown, others are all black : planes, NGUI's UIs, etc

IN UNITY PC
- all UIs has gone PINK
- i tried searching some more in this sites and found that i could be something about OpenGL ES 2.0, so i went and check. I found that in my Edit -> Graphics Emulation , i already have checked in OpenGL ES 2.0 (and also in player setting is 2.0 too)

when i tried changing to 1.1 or no OpenGL ES, Unity CRASH .


Conclusion :
- i have problem building project into Android but almost everything has not shown
- every UIs in my Unity's gone pink


Thanks very much for helps :)

7
i'm new to NGUI, after bought the full version and using it with my current project i got the problem.

i created some UIs with the textures in my atlas then i add black image with transparent into my atlas (after completely created some UIs using my atlas) and all images in my atlas all shifted.

am i doing something wrong ? any suggestions would be appreciated

here is my black image > https://dl.dropboxusercontent.com/u/51053996/Pics/%5BWorld%5DBlack.png

Pages: [1]