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

Pages: 1 ... 3 4 [5] 6
61
NGUI 3 Support / Suggestion: UISpriteAnimation stop/pause function
« on: June 13, 2012, 10:55:58 AM »
Hi!


It would come handy for me, if there was a function or property in the UISpriteAnimation which would make the animation stop or pause, so i wouldn't need to modify this script every time an update is released.


Best Regards

62
NGUI 3 Support / Re: change uisprite's texture
« on: June 12, 2012, 05:11:45 AM »
This worked for me with no problem so far:


  1. mySprite.spriteName = "sprite_name_in_string";
  2. mySprite.MarkAsChanged();
  3.  

63
NGUI 3 Support / Re: UIPanel - Drawcalls priority problem
« on: June 11, 2012, 08:44:31 PM »
Are those widgets anchored?

64
NGUI 3 Support / Re: UIPanel - Drawcalls priority problem
« on: June 11, 2012, 06:34:19 PM »
My workaround is to bring your widgets closer to the camera which you want to be drawn first.

65
NGUI 3 Support / Re: Most efficient search method?
« on: June 05, 2012, 01:40:39 PM »
There is a function called getchildcount or whatsoever which gives the number of children in a given object, but i prefer storing the components in an array and iterating through them using foreach like "ENAY"'s 2. algorithm. It's faster that way since you have direct access to them.

66
NGUI 3 Support / Re: UILabel alpha performance hit
« on: May 21, 2012, 11:52:25 AM »
I guess i have to come up with something else then.


Thanks for the fast replies, though :)

67
NGUI 3 Support / Re: UILabel alpha performance hit
« on: May 21, 2012, 11:44:55 AM »
Hmm...
Then there is no way to fade the text out? :S

68
NGUI 3 Support / UILabel alpha performance hit
« on: May 21, 2012, 11:16:03 AM »
Hi!


I have a "Help" menu in my application which has large amounts of text on it stored in a UILabel.
When this menu is closed, all of its components' alpha value is lerped to 0, making it fade out, then it gets destroyed.
My issue is: Lerping the alpha of a UILabel having a large text results in a huge performance hit on an iPhone 3GS and iPhone 4.
The profiler shows that the UIPanel's lateupdate method reserves the 80% of the available resources when doing the alpha fade.


Is there a workaround to this performance issue?


Regards


69
NGUI 3 Support / Slider issue
« on: May 15, 2012, 11:53:37 AM »
Hi!


I just placed 2 sliders in my existing project, and i noticed that if I move the slider's thumb to the left end of the slider, and then move it right, the coloring of the slider becomes buggy( the slider looks like its value is on 1.00 regardless of the thumb's position). If this procedure is repeated, the slider shows the right coloring values again.


Is there any way to fix this?


Regards

70
NGUI 3 Support / Re: Reverse tweening via code
« on: May 12, 2012, 04:50:51 PM »
Mother of god, how did i not notice it? Thanks a lot :D

71
NGUI 3 Support / Re: Reverse tweening via code
« on: May 12, 2012, 07:31:16 AM »
I've already tried, it. No results. :(

Here's how i'm doing it,

  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class SettingsButton : MonoBehaviour
  5. {
  6.        
  7.         public TweenPosition[] tweener;
  8.         public GameObject Settings;
  9.         GameObject Current;
  10.         public Transform GUIMAINPANEL;
  11.         // Use this for initialization
  12.         void Start ()
  13.         {
  14.                 tweener = new TweenPosition[6];        
  15.         }
  16.        
  17.         void fillTweenerArray()
  18.         {
  19.                 Transform Grid = GameObject.Find("UIGrid").transform;
  20.                 int j=0;
  21.                 for(int i=0;i<Grid.childCount;i++)
  22.                 {
  23.                         if(Grid.GetChild(i).name == "Button")
  24.                         {
  25.                                 tweener[j] = Grid.GetChild(i).GetComponent("TweenPosition") as TweenPosition;
  26.                                 j++;
  27.                         }                              
  28.                 }
  29.         }
  30.        
  31.         void playTweens(bool forward)
  32.         {
  33.                 foreach(TweenPosition tween in tweener)
  34.                 {
  35.                         tween.Play(true);
  36.                 }
  37.         }
  38.        
  39.         void OnClick()
  40.         {
  41.                 if(Current == null)
  42.                 {              
  43.                         Current = Instantiate(Settings,Vector3.zero,Quaternion.identity) as GameObject;
  44.                         Destroy(Current.GetComponent("UIPanel"));
  45.                         Current.transform.parent = GUIMAINPANEL;               
  46.                         fillTweenerArray();                    
  47.                         Current.transform.position = new Vector3(-380f,79.1f,-167.4f);
  48.                         Current.transform.localScale = new Vector3(1f,1f,1f);
  49.                         StartCoroutine(reposition(Current)); // just a yield and a sendmessage to reposition the grid
  50.                         playTweens(true);
  51.                 }
  52.                 else
  53.                 {
  54.                         playTweens(false);
  55.                 }
  56.                
  57.                        
  58.         }
  59.  
  60.        
  61.         IEnumerator reposition(GameObject Current)
  62.         {
  63.                 yield return null;
  64.                 Current.transform.FindChild("UIGrid").GetComponent("UIGrid").SendMessage("Reposition");
  65.         }
  66. }
  67.  

72
NGUI 3 Support / Reverse tweening via code
« on: May 11, 2012, 12:05:58 PM »
Hi!

I have a menu bar which i instantiate via code into the game. It has a UIGrid with Button GameObjects, each button having a tween position script attached to it. These tween position scripts are disabled by default and set in a way that the buttons don't arrive at their destination in the same time, but with a delay. The method which instantiates the the menu bar (playTweens) starts the tween position scripts by iterating through the UIGrid's Button GameObjects.

I am currently trying to make these tween position scripts reversible( menu Back button ), but I have no clue on how to call the tween position scripts reversed.

Regards


73
NGUI 3 Support / Spirtes and Particle systems
« on: May 08, 2012, 11:15:04 AM »
Hi!

I have a main menu which consists of a sprite for background, a sprite for the game's title bar, a few buttons and a particle system.
The setup in terms of Z coordinates look like this: Camera-> Buttons -> Title bar -> Particle system -> Background.

My problem is that the particles emitted by the Particle system sometimes "disappear" for a while, then reappear randomly. It's like NGUI can't decide whether to draw the sprites behind the particles or ahead of them. For a few frames, it draws behind the particles, then for a few frames it draws ahead of them.

Is there any way to fix this?

Ps: I'm using the latest version of both NGUI paid version and Unity Pro iOS.

Regards

74
NGUI 3 Support / Re: Fonts
« on: May 07, 2012, 07:04:21 AM »
So basically i gotta have a huge Atlas with all the fonts i need to display?

75
NGUI 3 Support / Fonts
« on: May 06, 2012, 01:56:54 PM »
Hi!

I want my application to work with all languages' fonts. How can I do that?

Regards

Pages: 1 ... 3 4 [5] 6