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

Pages: 1 [2] 3
16
NGUI 3 Support / Re: 2.6.5 issue with label Shrink to fit.
« on: September 04, 2013, 06:16:42 AM »
Also, a second problem to the new style is that if you trying to create a single line of text, the resulting one line will automatically align to the top of the text box regardless of it's anchor point.

This is actually more of a "problem" for us right now than the previous bug I mentioned.

17
NGUI 3 Support / Re: 2.6.5 issue with label Shrink to fit.
« on: September 04, 2013, 06:06:07 AM »
That works.  Thanks!

However, there is a specific usage scenario that people might run into. Now this might be an edge case; so you may not want to fix it.

If I want to create a title, often I don't want the label to run over one line. However, with the new system, I set a maximum line height. So in this case, it would be 42 for the bold font. However, if the title becomes sufficiently long (look, my designer is kind of wordy ;-) ) then the font will shrink so that it fits into that maximum line height twice.

I don't know if that would be easy to fix however.


18
NGUI 3 Support / Re: 2.6.5 issue with label Shrink to fit.
« on: September 04, 2013, 05:37:29 AM »
Just separating this question then: if I revert all scripts relating to UILabels to 2.6.4, can I still benefit from the following change made in 2.6.5: "- FIX: Widgets no longer store a reference to texture and material." ? Right now, this is the only functionality we need from 2.6.5.

19
NGUI 3 Support / Re: 2.6.5 issue with label Shrink to fit.
« on: September 04, 2013, 05:35:09 AM »
I am experiencing the same problems, but I did a couple of tests.

I have the following fonts:

Ref_Calibri_Bold_42
Calibri_42_Bold_HD (42 Bold Bitmap Font, Pixel Size on Atlas = 1)
Calibri_42_Bold_SD (22 Bold Bitmap Font, Pixel Size on Atlas = 2)

Creating a new label with the following settings:

Fonts: Calibri_42_Ref
Text "New Label"
Max Width = 150 pixels
Max Height = 45 pixels (To make sure the SD font fits into a single line.)
Max Lines = 1 line
Shrink to Fit = True

First I tested loading "Calibri_42_Bold_HD" into the Reference font.
Adding extra text to this label (i.e. making it say "New Label New Label") will not shrink the font.

If I instead use "Calibri_42_Bold_SD", it will shrink the font to point 22 even though the max height is set at 45. (It does not seem to take the pixel size of the atlas it's on into account.) The green gizmo visibly extends beyond the text, however, adding extra text to the label will not shrink the font further, nor does it add the extra text even though there is still space for the label to grow.

I've tried a couple of combinations of max lines and max height, that doesn't seem to make Shrink to Fit.

I can take some screenshots if you want, Aren.

20
Hey Sisso,

For us less code-literate, could you give a quick explanation about what that piece of code does?

Since it seems we're dealing with the same issue, it would be much appreciated!

Regards

Chris

21
Awesome, thanks!

22
Thanks for this. I'll have our coder look into it!

Though what I don't get is, if the game starts with the SD textures loaded into the project's reference atlases, why would it need to clear out / update the draw calls from HD to SD on sprites? Is that just a cache thing in the Unity Editor?

23
Hey all,

So we have a scene where all sprites are assigned reference atlases. After testing these with HD atlases using a handy little debug script that shows the currently loaded textures, we saw that everything was fine - only the HD Textures are loading, as intended.

However, as soon as we change the reference atlases in the Project to point at the SD atlases instead, we run into a situation where both the HD and SD atlases are being loaded.

We ran a second debug script that tells us the UISprite which is using said atlases. Normally this works fine, but in this case it came up with no assigned sprites. 

One thing that came up earlier in the project was that if someone accidentally added two UISprite components to an object, even if the UISprites were pointing at a Reference, it would load SD instead. But we've solved those issues and stepped through each sprite and label in the game to make sure they are using references - both with scripts and manually to check.

I'll be doing some more specific testing today, but right now we're at a bit of a loss. Anyone got any experience with this and know what the cause could be? Any help is much appreciated!

24
NGUI 3 Support / Re: Can't seem to get Fonts right
« on: August 01, 2013, 06:44:16 AM »
Max texture size is device dependent. It's 1024x1024 for Iphone 3G, 2048x2048 for 3GS, Iphone 4, and Ipad 1, and 4096x4096 for devices newer than those.

Edit: and Android obviously has their own range, so you'll need to check that individually.

26
Hey Aaron,

Thanks for that! Will get one of our coders to write it like you suggested.


27
Hey all,

Wondering if it's possible to expose the material controls in the animation window when you're creating an animation for a UITexture gameobject? Reason for this is that we want to make a combined prefab with a UITexture object and Particle object, and we'd like to keep as much inside NGUI as possible.

(The UITexture is setup by assigning a material to it's material slot, so it's not generating a dynamic material right now.)

Thanks very much for any help!

Regards,

Chris

28
Hey all.

Not sure where to post this, but I figured since it's not an NGUI thing, and the Unity Support forums are flippant about 2D applications for Unity, this might be a likely spot. I figured it'd also help since a lot of us here design around 2D games, and this might be applicable to some other members / teams. 

I'm wondering if anyone has encountered this issue before. I'm an artist working on a board game for tablet devices. Due to the nature of these games, we have a large amount of unique art assets which we would not like to compress down, as most compression formats available for mobile devices simply don't handle painted assets like these well.

Saving our textures in the PNG format is ideal for us since it retains the quality when used in-game (it does balloon back to truecolour size in VRAM, but we've designed around that) but keeps the post-install size of your app way down. We can save around 100 - 140 megs on a users phone, which helps retention of the app.

Unity simply won't allow you to build out the final app with textures saved in a PNG format, though. So has anyone found a work around for this? I'm not necessarily looking for an automated system either - I can lose a few hours to doing this process manually. I've looked around a bunch, but all I found was five lines of code that as an artist I'm not sure how to use in our project. (Reference here: http://forum.unity3d.com/threads/162962-Unity-iOS-Image-Sizes?p=1117160&viewfull=1#post1117160)

Any ideas would be greatly appreciated!

29
NGUI 3 Support / Re: Problem - different screen sizes
« on: February 04, 2013, 11:44:50 AM »
Attach an anchor point to the top left and top right of the panel that manages your UI, then parent those objects to the anchor points. That will mean they'll always be in the corners.

30
Oh. Dear.

I guess that was sort of obvious after I set up my test scene wasn't it?

Thanks for the swift reply! I'm going to sort out my prefabs now to fix that.


Pages: 1 [2] 3