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

Pages: [1]
1
NGUI 3 Support / Re: UIAtlasMaker exception
« on: June 15, 2014, 11:26:48 PM »
I am also having this issue (Unity 4.3.4f1, NGUI 3.5.9, Mac OS X 10.9.3):


It's when I'm trying to update 1 image within a particular atlas, it crashes every time. The error message is the same as everyone else has mentioned and seems to be caused by a null reference in UIAtlasMaker.cs line 147:
  1. if (Mathf.RoundToInt(rect.width) != textures[i].width) return false;
  • Restarting Unity didn't fix it
  • Trying to update twice didn't fix it
  • Creating a blank scene before updating the atlas didn't fix it

Here are all of my Atlas settings:




And here are the settings of the image that I'm attempting to update:


I am completely stuck and not sure how to go on without re-doing a significant amount of work  :(

2
I have a UIScrollView and I'm also using a UICenterOnChild. As dragging occurs, I would like to execute a function whenever a new UISprite becomes the new object that is *mostly* in the center (ie, the object that would be snapped to using UICenterOnChild if dragging stopped).

I would like to update information outside of the ScrollView based on which object is currently (mostly) centered. Any suggestions?

3
I just switched everything to a single 3d NGUI camera and got rid of the anchors. This fixed it. Thanks!

4
NGUI 3 Support / UIWrapContent dynamic Item Width & 2d+3d content
« on: May 18, 2014, 10:22:41 PM »
Goal:
I'm trying to setup a wrapping scrollable level select screen that is a combination of 3d elements (the room the player is standing in) and 2d elements (the contents of the in-game computer screen which can be swiped & tapped to select a level).

Current status:
I have a 3d camera properly setup showing the right view. I have a UI Root and UICamera setup, which contains a Scroll View & Grid (which has a UIWrapContent attached to it). The UICamera is not actually used to render anything at all, but I wasn't sure if I could get rid of it since I think it needs the UICamera Script to make all of the rest of the NGUI stuff function properly.

Problems:
Everything works great with the perfect screen size & resolution (preview here). But once the resolution changes, I have two problems:
1) If the resolution gets small, the ScrollView size (anchored to UI Root) shrinks too much (preview here, note the bad black borders).
2) If the resolution gets big, the Sprites in the grid start overlapping (I'm guessing because of fixed grid/UIWrapContent width?), which you can see here.

Any suggestions? Am I approaching this completely wrong?

Pages: [1]