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

Pages: [1]
1
NGUI 3 Support / Re: Change Color Tint of UILabel?
« on: April 17, 2013, 03:06:48 PM »
This is a dead link

2
NGUI 3 Support / creating SD atlas from HD
« on: February 07, 2013, 04:53:13 PM »
I'm trying to create an SD atlas from my HD iPad resolution atlas. Is there a faster way to create this 1/2 res atlas other than taking all of the images that I used to create the HD atlas, scaling them by 50% and then creating a new atlas with the scaled images?

Ideally, I'd like to simply take the HD atlas image directly and scale it by 50% rather than taking each image one by one and rebuilding another atlas. I assume that this won't work because the UV coordinates won't transfer between atlases.

3
NGUI 3 Support / Re: Interesting year...
« on: November 01, 2012, 05:01:25 PM »
Indie game development is never easy and you can never predict success. At least you tried to put something out there and were passionate about working on it. The game looked very polished and you should be proud of it. There's no reason that you can try again once your batteries are recharged.

I'm sure developing NGUI wasn't always what you wanted to be working on, it is one of the greatest resources that was created for Unity ;D. I'm sure that there are many developers that would not have been able to complete their projects without it, and we are certainly in that boat. Your support for the product has been the best I have ever seen for any product and Unity is lucky to have you working for them. I hope you decide to release game asset packs in the future because I'm sure that both you and the community would benefit.

Enjoy this teaser trailer of our newest mobile game which made extensive use of NGUI -  ;)

http://www.youtube.com/watch?v=olIX92LA_uQ

4
NGUI 3 Support / hide multiple UIPanels
« on: November 01, 2012, 10:11:58 AM »
I'm using animations to swap out 8 different UIPanels that include draggable windows. Everything is working fine, but playback is starting to slow and I'm worried that when I try to play everything on a phone that performance will be bad.

Is there any way that I can disable UIPanels in script when they are not appearing on screen? In other words, after they are animated off screen I would like to disable them from being updated so they will not tax the CPU.

5
NGUI 3 Support / adjusting the dimensions of UISlicedSprite in script
« on: September 15, 2012, 03:04:01 PM »
I feel like this should not be too difficult, but I cannot get any results with the solutions proposed in this forum. Currently I have this, which does not appear to scale the sprite at all.

public GameObject Icon;
Icon.transform.localScale += new Vector3(1.5f, .1f, 0);

Is there another way to change the dimensions of a slicedsprite so I can keep changing it throughout my script?

6
NGUI 3 Support / Re: disable collider on dragable window
« on: August 16, 2012, 04:49:51 PM »
Ah ha! I knew that those were in there for a reason.  :)

7
NGUI 3 Support / disable collider on dragable window
« on: August 03, 2012, 01:49:50 PM »
I'm using a draggable panel window and the grid stretches wider than the draggable clipping area, just as it should. I can still effect the scrolling of the draggable panel when I swipe any of the grid items outside of the clipping area. In other words, I can still scroll the panel with invisible panels!

Is there an easy way to disable panel collisions if they are not inside the clipping area of the draggable panel?

8
I guess my question is semi-related to this. I simply want a drag panel to reset to it's own starting position when another button is pressed.

I'm using one panel for different categories populated by arrays, but when one panel is down at the bottom, and the other does not have the same number of objects, you can't see the new arrays items.

If I could just use UIDraggablePanel.ResetPosition it might solve this. But I've tried getting the reference to the script by using:

public UIDraggablePanel  panel;
panel = GetComponent<UIDraggablePanel>();

then

panel.ResetPosition ();


but I get a null exception when trying it this way.

9
NGUI 3 Support / Re: Fantasy Atlas
« on: June 27, 2012, 11:11:42 AM »
Ok, this helped me figure out how to accomplish what I wanted.

1. I copied each color channel into an separate file and used the channel data to create an alpha mask.

2. I filled that alpha in a separate layer, so I could then apply a bevel.

3. I made the background layer dark grey to remove any halo around the font edge.

4. a flattened the layers and copied the resulting image.

5. went back to the original packed font bitmap and selected the color channel that holds the characters I bevelled.

6. activate the alpha selection of this channel and then > paste into

7. repeat steps 1-6 with the other color channels, then go back to Unity and create the font as outlined in your helpful youtube video:

http://www.youtube.com/watch?v=dY6jQ7d2ius

Now if we could get outline support in a pack fonts shader standard I will have 100% flexibility with custom fonts.

10
NGUI 3 Support / Re: Fantasy Atlas
« on: June 27, 2012, 10:44:47 AM »
I would love to have more information on how this bevel mod is done in Photoshop. The standard atlases look so much better and I would like to know how they were made.

For example, when I export a bitmap from BMfont, you say to check "Pack chars in multiple channels", but doing this makes the bitmap uneditable in photoshop because everything is pack on top of itself. Can I somehow unpack them in photoshop for editing?

11
NGUI 3 Support / Re: Packed Font Shader With Outline help
« on: June 27, 2012, 10:41:11 AM »
Will this effect the existing fonts already in the NGUI examples? Is there any chance that Aren will roll these additions into options for future NGUI updates to allow for packed font outlines/ shadows as standard options without this codemod ?

12
NGUI 3 Support / Re: So you want to make health bars...
« on: June 21, 2012, 04:47:09 PM »
I'm scaling my health bar sliders with this this code:

  1.         public void UpdateDisplay( float x) {
  2.                 if( x < 0 )
  3.                         x = 0;
  4.                 else if( x > 1 )
  5.                         x = 1;
  6.                        
  7.                 _slider.foreground.localScale = new Vector3( _maxWidth * x, _slider.foreground.localScale.y, _slider.foreground.localScale.z );
  8.                 oldxp = GameManager.Instance.curxp;
  9.         }

The problem is that whenever x = 0, when I view the health bar on my build, it distorts stretching the sprite across the screen where it terminates somewhere in the center of the game view. Not sure why this is happening, maybe I just need to disable this sprite if x = 0. Is there a better way?

13
NGUI 3 Support / Re: NGUITools.SetActive not updating after made true
« on: June 19, 2012, 07:07:41 PM »
Thanks for the responses guys.

ArenMook had the solution, I had static checked in my UIPanel. Unchecking it allowed the panel to update.

So the hierarchy is UI Root (2D) > UIPanel > UIDraggablePanel > UIGrid > UIDragPanelContents

Thanks again.

14
NGUI 3 Support / NGUITools.SetActive not updating after made true
« on: June 16, 2012, 05:31:16 PM »
I have an array of GameObjects that I disable in start with

  1.         void setAllItemsInvisable() {
  2.                 for ( var i = 0; i < 6; i ++ ) {
  3.                         for ( var j = 0; j < 7; j ++ ) {
  4.                                 NGUITools.SetActive(buttonViewableArray[i, j], false);
  5.                         }
  6.                 }
  7.         }

which works well enough. Then I make the GameObject active with

   
  1. public void MakeButttonVisible(int category, int item) {
  2.                 NGUITools.SetActive(buttonViewableArray[category, item], true);
  3.         }

I can see that the GameObject is active, but it does not update in the game view until I click on it and move it around. Is there somewhere else that I should be putting the SetActive method so that it will happen when it's called and not require the playing around to get it to appear?

15
NGUI 3 Support / pass arguments with UIButton Message
« on: June 15, 2012, 01:45:02 PM »
I'm currently using UIButton Message in several situations where I need to pass some arguments along with the function call. Is there an easy way that I modify the script to do this?

Pages: [1]