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

Pages: 1 ... 13 14 [15] 16 17
211
NGUI 3 Support / Changing a sprite in code
« on: May 17, 2012, 11:47:28 PM »
Ok, stupid question alert. How do I change a sprite into another? In code all I want to do is choose another sprite in the atlas.

Put simply, I want something like this.

MyNGUIMenu.GetComponentsInChildren<UISprite>()[0].image = "image2";


This is for a character select screen, I have my window, multiple faces in the atlas, just need to find that last piece of the puzzle to change the face.

212
NGUI 3 Support / Re: 2.0.6 Update Compile Error Bug
« on: May 17, 2012, 04:06:04 AM »
You're not kidding there. We have often crazy problems. Like I will update from the server and it will ask me to confirm whether or not I want to rename some graphic assets that a graphics artist has created and has nothing to do with me.

Anyway, everything is only working fine on the machine of the boss (who installed NGUI) and it is just everyone else who is struggling. So certainly there is a problem with the asset server.

213
NGUI 3 Support / Re: 2.0.6 Update Compile Error Bug
« on: May 17, 2012, 03:57:54 AM »
Well we have no idea what has gone wrong. Now if we delete the original source code from the asset server (in other words revert the project) the non compilable source code just magically reappears again.  ???

Looks like we will have to create a new project from scratch and reimport all the old source code and assets.  :o

214
NGUI 3 Support / Re: 2.0.6 Update Compile Error Bug
« on: May 17, 2012, 03:50:14 AM »
Create a new scene?

We have the NGUI used in multiple scenes so I am not sure what you mean about making a new scene.
How do we delete the Unity references? It is odd because the readme still says 2.0.1 even though the textfile is named 2.0.6

215
After updating to the latest version of the NGUI I get the error:-

"Assets/NGUI/Scripts/Interaction/UIButton.cs(19,33): error CS0115: 'UIButton.OnEnable()' is marked as an override but no suitable method found to override"

Clearly something is odd, have just had a few odd looks from other people in the office since everyone has just updated their the project from the assett server and can no longer compile.

I am looking into it now.

[edit]

Well I am not sure what is wrong, if I fix that error, another error appears, and another, did I do the update wrong?
I deleted all of the original NGUI stuff and then added the new update. Did I do something wrong?

216
NGUI 3 Support / Re: NGUI CheckBox oddity
« on: May 17, 2012, 02:59:17 AM »
Well what I thought of doing was almost exactly that.
After creating the menu, updating the values of .isChecked with some separate bools. Just seems a bit odd to me that there is a bool in the button and elsewhere.

217
NGUI 3 Support / Re: NGUI: Packed Font (Video Tutorial)
« on: May 17, 2012, 02:05:09 AM »
That's what I thought, I just couldn't tell. Time to have a test and see what happens.

218
NGUI 3 Support / NGUI CheckBox oddity
« on: May 17, 2012, 02:04:25 AM »
Just been fiddling around with UICheckbox. I have my checkboxes and they click and then the bool parameters updates in the function I specified.
Everything as I expect, however when I come back to the menu later, the ticks are reset back to their defaults, therefore is it was true and then I set the value to false.
Next time I go back the variable is still false but the menu is back to true. So already they have become out of sync.

Maybe I am missing something simple, such as linking a variable that makes a connection so that it reads what value the variable is and updates when the menu appears.


--

By the way, embarrassingly I have only just discovered that you have a front end to your website and I discovered your documentation page.
http://www.tasharen.com/?page_id=197
and this
http://www.tasharen.com/ngui/docs/annotated.html

I can't believe I missed it after all this time.  :o
All I have only been using is a few online tutorials. I genuinely thought the forums were your entire site, since clicking home takes you to here and there are no other links to get back to the main area. Stupid me.

219
NGUI 3 Support / Re: NGUI: Packed Font (Video Tutorial)
« on: May 17, 2012, 01:45:45 AM »
That was an awesome tutorial thanks. Seems kind of ironic that I finally get my Japanese font working and then you release an update.  8)

It is a shame there are some limitations though, I noticed in the window (or maybe it was just youtube) that the fonts probably don't contain their aliasing, in other words they will look pixelated.
I don't think we care about alpha or adding the font to an atlas (that means I guess an extra draw call) but I think the shadow outlines and clarity of the font is vital, since we need to have different sized texts and I suspect without the aliasing they would probably go quite distorted.

However, an awesome feature that I will certainly look into later.

220
NGUI 3 Support / Re: Getting all Japanese Fonts to appear?
« on: May 16, 2012, 03:34:01 AM »
Oh I see, well it is odd that nothing is mentioned in the GUI, still says 1024x1024. Reexported again at 1022x1022 and it fits in there now. :)

221
NGUI 3 Support / Re: Getting all Japanese Fonts to appear?
« on: May 16, 2012, 02:28:33 AM »
I literally followed your tutorial and things are working now, the text is all appearing.
Only strange thing is that when I add my 1024x1024 texture the atlas will always resize to 2048x2048. Not sure if this is a bug or not. You can't manually resize the atlas in the GUI so it stays the way it is.

222
NGUI 3 Support / Re: AutoResizeButton ?
« on: May 16, 2012, 01:26:35 AM »
Ok, so I have my code to search through all the buttons in the menu and adjust the size accordingly.

The problem I am having is that I am searching through all my labels using

foreach ( UILabel label in text_strings)

First problem with that is that I am also finding labels that are used for non button strings.

Next problem is the same when searching for the images to resize using

foreach ( UISlicedSprite button in button_bg)



I guess what I am looking for is to access both lists, something like this:

foreach UIButton button in button_list
{
    Debug.Log(button.label.cachedTransform.localPosition.x);
    Debug.Log(button.slicedsprite.relativeSize.x);
}

But as far as I can tell UIButton is not actually anything special in itself and is simply a Unity Object with a sprite and text string attached so you can't reference them like that.

223
NGUI 3 Support / Re: NGUI as a particle engine?
« on: May 15, 2012, 11:40:18 PM »
Right now our game is using another library tk2d for the certain particle effects within the game. Just wondered if the author himself considered his engine to be particle worthy. Right now I think it will be a mix and match, but due to the awesomeness of NGUI we will certainly look into using NGUI for everything particle/sprite/menu etc related.

As you Drexster have already achieved something, that is certainly reassuring and also promising too. :)

224
NGUI 3 Support / Re: Getting all Japanese Fonts to appear?
« on: May 15, 2012, 11:35:54 PM »
ArenMook、you sir, are a legend.  8)

225
NGUI 3 Support / Re: Getting all Japanese Fonts to appear?
« on: May 15, 2012, 11:22:11 PM »
Wow there is a video tutorial? Awesome, do you have a link.

I know you gave me a link some weeks ago to http://www.burgzergarcade.com/ but I didn't find anything related to importing a font created with BMFont.

Pages: 1 ... 13 14 [15] 16 17