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

Pages: [1]
1
NGUI 3 Support / Infinity Scroll
« on: March 18, 2014, 02:37:54 PM »
Hi,

Not a question, I just needed an infinite scroller and couldn't find it so built it myself. I figured I'd share my work.

Please note:
- I tested this with NGUI 3.5.4 r2 only
- All my scroll-items are the same (it's for the credits of my game, which I want to repeat itself infinitely, but also be scrollable). If you want to create an infinite leaderboard or something like that, you'll have to make adjustments.
- I made this in just over an hour, it's not clean code, it works for me though.
- It auto-fills your scrollview, but should work fine without doing that.
- You simply add this InfinityScroll script next to your scroll view component.

Check out the video here:
http://youtu.be/SYeZTMIY7HI

Hope someone can use it or make something more dynamic out of this ;)

2
NGUI 3 Support / Creating SD from HD Atlas
« on: January 14, 2014, 06:25:33 PM »
Hi all,

I just created my SD atlas from my HD atlas, by doing the following.

1) Duplicated & Batch resized all my source images (using OSX Automator)
2) Selected the folder with the resized images in Unity, clicked 'Select Dependencies' & Created new atlas called 'SD'
3) Went through all (it was only 25) sprites in the HD atlas and changed the border of my SD sprites to 0.5 of the ones in the HD atlas.
4) Changed the pixel size in the SD atlas from 1 to 2

This took me 10 minutes and it worked perfectly. Still, I felt like an idiot manually resizing those borders. And of course, whenever I update the HD atlas, the SD atlas will not be automatically updated.

Is there an automated way to do this?

Thanks all.

3
NGUI 3 Support / LateUpdate eating away performance
« on: October 03, 2013, 02:16:15 AM »
Hey all,

I'm in a pretty far state of my game, built with Toolkit2D and NGUI (and about 10 other plugins, but I think irrelevant). I noticed my game is slow on many of the lower end mobile devices and when I checked with the profiler, I was surprised to see it was the NGUI LateUpdate method which was causing most of the lag. Upgrading to NGUI 3.0 did not help, in fact, it seems even slower.

Anything that comes to mind right away about what I might have done wrong? Or could there be a million reasons? I can get into more detail but I hope there's an obvious answer ;)

I added a screenshot of the profiler, it seems BetterList`1.Add() is making a lot of calls (17532).

Cheers guys


4
NGUI 3 Support / Tiled Sprites
« on: August 06, 2013, 11:56:05 PM »
As I was (like many others) looking for a solution to create sliced tiled sprites, I noticed that tiled sprites don't repeat the texture but actually repeat the geometry. I wouldn't mind digging into this, but could you tell me why you don't just use a tiled texture and have 2 polys instead of nTile*nTile*2 polys?

5
NGUI 3 Support / Dynamic Font Z-sorting
« on: April 26, 2013, 04:48:35 AM »
Dear all,

I have a problem with the new dynamic font, which I am using in both my panels and my main screen. It seems like there can be only one dynamic font in the scene. Even with different TTF's, different GameObjects, I can not manage to have two different dynamic fonts.

Mostly this a problem because of Z-sorting. The text in the main screen is now always in front of my panels.

Any ideas on how to fix this? Or is this actually fixed in NGUI 2.6.0 ? I'm using the dynamic font package right now.

6
NGUI 3 Support / Multi language support
« on: April 17, 2013, 05:18:15 AM »
As I would like to add multi-language support to my entire game, which I would like to do through loading XML-files into my game (since these are easily adjustable through other software), I found that NGUI does not seem to support this yet. Surprising, considering the size of NGUI, so I am not sure if this is actually true.

Should I build this myself? I am actually doing that right now and it's not that hard... which makes me wonder even more if it doesnt exist yet.

Cheers guys

7
NGUI 3 Support / Arab Font in NGUI
« on: April 17, 2013, 02:08:09 AM »
Hey guys,

Hurray for NGUI supporting dynamic Fonts! Life saver and thanks to all those who worked on that.

This morning I was trying to get the Arab font working for my game and I just managed to do that. I'm just sharing this to save other people some work and perhaps even get some feedback.

Basically for the UILabel, it was super easy.
  1. myLabel.text = UnityPersianPatcher.PersianCharacterPatcher.Patch(arabicText);
  2. myLabel.pivot = UIWidget.Pivot.Right;
  3.  

I used the Unity Persian Patcher, which is used to create actual Arab words out of the separate characters. Little lesson about Arab (which I only learned this morning), the characters change depending on their adjacent characters, unlike Western characters, which stay the same no matter what they're surrounded by.
It's a free asset and I would recommend it over the 2 45 USD alternatives, which seem to offer nothing more.

Done deal, as simple as that.

Then my second 'challenge' was to fix this for the UIInput-class, since my Arab customers also fancy a chat.

Since I had to make many changes there, I just added the class UIInputML (ML= MultiLanguage & yes I know it's only Arab) to this post. All changes are commented (wherever it says
  1. //Ivo: any comment
  2.  
, I actually made a change.

It worked on my iOS device, where of course I had to use my Arab keyboard (Settings > General > Keyboard > Keyboards > Add New Keyboard... > Arabic) to see that it worked.

Specs:
Worked with: Mac Mini - OSX Unity 4.1.0f4
Tested on: iPad Mini - iOS 6.1.3

Complications:
I did not manage to type Arab text in the UIInput, while working in the Editor.

[EDIT] I just found out the numbers don't work properly. Will work on that later!
[EDIT2] I also found out Multiline doesn't work. Maybe I shouldn't have uploaded this yet ;)

8
NGUI 3 Support / Dynamic panel
« on: April 04, 2013, 10:21:17 PM »
Hey guys,

I'm currently trying to add a dynamically sized panel to my game (just saving the corners and middle parts). I want these to be in one Atlas (obviously) but the problem is if I set the Filter-mode to 'Bilinear', it will create lines between the parts. When I set the filter-mode to 'Point' this problem is fixed, but the corners look pixelated.

What to do? This problem has been bugging me for some hours and I can't seem to figure it out.

Cheers,

Ivo

9
NGUI 3 Support / Highlight button with shader
« on: March 27, 2013, 01:36:05 AM »
Hey everyone,

I'm not that familiar with shaders, but I want to create a button which hight-lights on click, without any color, but all colors just brighten. I was thinking to just go for a white color in the UIButton of NGUI, but it actually doesnt do anything because I believe this shader replaces all the white parts of the image by the chosen color, which of course results in nothing if that's white.

Any ideas on how to change this shader?

Thanks guys,

Ivo

10
NGUI 3 Support / NGUI with different orientations [SOLVED]
« on: March 11, 2013, 02:46:14 AM »
Hey there!

I am currently developing a game for iOS which requires me to have portrait-menu and a landscape-game. I know how to change this in code, but I'm actually trying to create the game NGUI menu now and I'm not sure what the best approach is, since I'm using Anchors in both orientations. Should I create 2 UI-Roots?

Cheers,

Ivo

11
NGUI 3 Support / Unity Crash
« on: May 08, 2012, 01:45:44 AM »
Hey Arenmook,

I'm getting a Unity-crash when I add the UITiledSprite to my existing sprite. Using version NGUI 2.0.4c (latest). I know I also shouldn't do this (I actually clicked it by mistake) but ofc the system should never crash. Hope this is the right place to post crashes.

Cheers,

Ivo

12
NGUI 3 Support / Tween Multiple UISprites
« on: April 27, 2012, 02:34:19 AM »
Hey,

After buying the full package of NGUI, I found out I basically wasted my time with the free version. It's much better and worth the money! Anyway, I've been trying to use ColorTween to make my UIEquipmentslots fade in. Unfortunately, my UIEquipmenslots consist of three items (Background, Label & Icon). If I tween the whole GameObject, it will only take one of the three items to tween along though. This is first my background, if I remove that it's my Icon, if I remove that, it's my label.

Clearly it only gets one child to tween along.

I'm trying to fix this, but at the same time I thought I'd share it, perhaps someone else knows how to fix it.


13
NGUI 3 Support / Atlas-update problem
« on: April 23, 2012, 05:37:14 AM »
Hey there!

I'm currently experiencing a lot of problems when updating my atlas, since it moves all parts around and messes up my manually changed mOuter&mInner rectangles. For example, a manually configured tiled square, changes back to it's automatically set rectangles, which forces me to manually change it again. With one texture this wouldn't be a problem, however, with more textures this will cost too much time when later in my projects I have to make changes to the Atlas.

Any way to fix this bug - (is it a bug?)

Cheers,

Ivo

14
NGUI 3 Support / Main Menu
« on: April 19, 2012, 01:36:23 AM »
Hey!

This is a rather general question, but I am actually wondering if NGUI is suitable for creating a Main Menu in an iPhone game. It seems rather strange to be working with a 3D menu (even with 2D-sprites, but still you have the camera instead of just 2D on-screen drawing). Would you recommend to use the standard Unity GUI tools for main menu and NGUI for in-game? (that's what I'm thinking right now).


Thanks!

Ivo


15
NGUI 3 Support / Asset to Atlas texture problem
« on: April 18, 2012, 02:28:06 AM »
Hey guys,

I have a problem whenever I get a picture from my assets folder to the Atlas, it's the same. However, when I use it in my project as a panel/button, it actually seems to add some kind of smoothener to the sides of the picture, with and alpha which makes it fade it out. This is only one pixel-wide and barely visible usually, but in my case I have to get rid of this little line.

I just want the exact texture which I have on my computer to be on my sprites.

Did anyone encounter the same problem?

Cheers,

Ivo

Pages: [1]