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.


Topics - Mikkel

Pages: [1]
1
NGUI 3 Support / UILabel - BBCode turns itself off?
« on: August 06, 2015, 08:03:08 AM »
I'm trying to implement emoticons on UILabels (it's unfortunately a must these days for any app featuring chatting options), so...

I looked at the example scenes, which seem to work great, but when I tried to implement it using my own font (Bitmap font generated with BMFont) with some custom emoticons in the atlas... it doesn't work. Turns out BBCode turns itself off on scene load (??), for no reason that I can find.

Any idea of why this could be? My scene setup is as simple as it gets:
UIRoot
 -Camera
 -Sprite w/UIInput
 -UILabel w/BBCode turned on (if I input some of the emoticon code in the editor it works in the editor, but turns itself off when I press Play).

What I would ideally like to do was offload the whole hassle to the OS, but I don't think that's possible (developing for Android and iOS), but if it is... any pointers are very welcome. Using Unity 4.6.3. Will probably migrate to Unity 5 at some point, but not for a while yet.

2
NGUI 3 Support / [Solved] UITexture offset - shader?
« on: April 15, 2015, 03:20:25 AM »
Hi, I've been using NGUI for a couple of years now (paid version, of course!), but now I'm moving into uncharted waters (as it were), at least for me.

I'm in need of being able to "offset" the UVs of a UITexture, without clipping the texture. I can offset it just fine (see example), but it seems to clip the texture, then.

If I try manipulating the UVRect X or Y, parts of the texture gets cut - probably as intended, but it doesn't do what I need. What I would like is to be able to offset the uvs (I think), via code at runtime.

I'm not going to be doing it every frame, only after certain user-initiated events complete, whereupon I will need to update the texture. Moving or resizing the UITexture itself is not really an option, I just want to offset the image that appears on it (which is tileable of course!).

I've tried looking into customizing the shader, but honestly I'm in over my head on that subject.

Any chance anyone can shine some light on this subject?

Included is a (simplified) example of the actual vs desired results.

Pages: [1]