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

Pages: [1]
1
NGUI 3 Support / Update to 3.7.3 has errors
« on: September 21, 2014, 12:23:35 PM »
I am trying to upgrade from and earlier 2.x version (don't recall exactly which) on an existing project.  I followed the upgrade instructions, such as it is, exactly as I can understand them -- which is all of three lines:

1. In Unity, File -> New Scene
2. Delete the NGUI folder from the Project View.
3. Import NGUI from the updated Unity Package.

But I get have this error in my legacy custom code:

  1. Assets/Scripts/SelectBoard.js(13,23): BCE0018: The name 'UISlicedSprite' does not denote a valid type ('not found').

I understand the UISlicedSprite no longer exists.  What's the best way to resolve?

Thanks,
Manny


2
NGUI 3 Support / Re: Ability to manually define atlas coordinates gone?
« on: September 18, 2014, 10:16:04 PM »
I see that I can change the dimensions of existing sprites, but if I needed to "Add" a new sprite dimension from scratch, how do I do this?  I upgraded from 2.0.4 but this is a new Project I'm starting with the new version.

3
NGUI 3 Support / How do I set UI2DSprite at runtime in Javascript?
« on: September 18, 2014, 10:12:36 PM »
For the life of me, I've search and search but can't seem to find a way to get past this.  In my Javascript code, I have this:

myGameObject.GetComponent("UI2DSprite").sprite2D = "MySprite";

I get this error:

BCE0019: 'sprite2D' is not a member of 'UnityEngine.Component'.


My Kingdom on how to properly set UI2DSprite sprite name using Javascript during runtime.

Thanks in advance.
Manny

4
NGUI 3 Support / Ability to manually define atlas coordinates gone?
« on: September 16, 2014, 10:31:43 AM »
I just upgraded to version 3.7 and am alarmed to find that a major feature I use heavily is now gone -- or hidden in a poorly designed UI.

I don't use Texture Packer (long story) so I usually just make my atlas using Fireworks and then Add/Delete my sprites coordinates and name using the UIAtlas Panel tool as shown on this page:  http://www.tasharen.com/?page_id=120

My Question:  I have an atlas png file that I created manually... how can I manually define the sprite coordinates?

On a related note, does NGUI have a Auto-splicer line the built in Unity sprite (multiple) tool?  Or, alternatively, is there a way to leverage the atlas data that the Unity auto splicer tool create within NGUI?

Thanks in advance,
Manny

5
The is there an effective, performance optimized method of changing color tint and alpha setting of all the sprites that share the same atlas and texture at the same time?

I may have several hundred sprites that I would need to affect and looping over a sprite array does not seem effective--especially during frame Update where the value changes over time.

With regular Unity, I'm able to get a reference to the Material and the set the material's ".color.a" value at runtime.

Is there something similar for NGUI?

6
NGUI 3 Support / NGUI sprites as game sprites?
« on: May 11, 2012, 03:41:19 PM »
Is it possible or advisable to use the NGUI sprites as 2D game sprites?  Has anyone ever tried that?  I would like to but want to be sure that there are no major drawbacks before I invest too much time and effort.

7
NGUI 3 Support / Re: How To Make Label touchable
« on: May 11, 2012, 02:49:00 PM »
I found the issue.

Through a process of elimination, it turns out that a second UI grouping that I had (for other uses) which also contains a camera with the UICamera script attached was apparently intercepting the events.  Since it turned out that the second camera was redundant (probably added via the NGUI wizard and I missed it), I deleted it and now the events are being triggered.

Regards.

8
NGUI 3 Support / Re: How To Make Label touchable
« on: May 11, 2012, 07:08:30 AM »
Yes, I have added the collider using NGUI's menu option and the UICamera mask is the same as the camera and the label I want to receive the touch event.

But nothing is triggering.

9
NGUI 3 Support / How To Make Label touchable
« on: May 10, 2012, 09:15:42 PM »
I have a NGUI label on my game and am trying to make it respond to touch/mouse click events.  My function OnClick is not getting triggered. Can someone help?  I have the UICamera script attached to my camera that's rendering my GUI layer and I have my custom script which contains the function OnClick attached to my label.  I have also attached a box collider to my label and have it sized to cover the entire label text

Nothing is happening.

I am using Javascript.

Thanks. :'(

10
Great.  Is there a tutorial somewhere on how to add animations to a label?

11
So I added the TweenScale component to my label in the editor and it looks great.  However, I need to be able to turn it on and off at run time and to only have it PingPong only once.  That is to scale up and then back down again and then stop.

I am using Javascript.   My searches have not been fruitful.

Any help would be appreciated.

Regards,
Manny

Pages: [1]