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

Pages: [1]
1
NGUI 3 Support / Re: Pivot position in UITable
« on: March 07, 2013, 04:43:07 PM »
until this gets integrated with the main release I'm going to leave some keywords here as currently searching this on google yields less than desirable results, and this one is a good one:
NGUI right justify UITable
right align
right alignment
center justify
center alignment

2
NGUI 3 Support / Gotcha for those working on mobile
« on: September 24, 2012, 11:47:10 PM »
Lost about 40 minutes tracking down this issue with my UITextures causing a NullReferenceException when I built my game for mobile. After a few builds of just debug.logging where the issue occurred I found it was this line in UITexture causing the issue: Shader.Find("Unlit/Texture"); which lead to me to this thread: http://forum.unity3d.com/threads/151413-Unlit-Texture-Null-reference

Fixing it was a matter of putting an empty gameObject in the scene and putting a material with that shader on it, so that it would be included in the build.


Hope I put enough keywords and search terms here for people with this problem that are googling it to save them some time
EDIT: another term: UnityEngine.Material..ctor (UnityEngine.Shader shader)

3
ah the event mask on the view camera was set to the wrong layer, thanks

4
NGUI 3 Support / buttons inside Scroll View (Camera) unclickable
« on: May 30, 2012, 03:47:48 PM »
Trying to recreate the scroll view (camera) example, but when I tried it, the buttons inside the scroll view don't seem to be getting click events, here's the steps that I did:

1. Created 2 UI's Main and view
2. In View's UI I separated the anchor and the camera and set the camera in the anchor to Main's camera
3. Positioned the View Panel and camera way off screen
4. Put UIGrid on the View Panel, added a bunch of buttons and hit reposition
5. Created a sliced sprite background for the area in Main's panel, and gave it 2 child objects topleft at the top left and bottomright at the bottom right
6. Attached UIViewPort and UIDraggableCamera to View's Camera, in UIViewPort setting Source Camera to Mains Camera, and the top left and bottom right points to the empty objects from the previous step. Set the root in UIDraggableCamera to View's root
7. On the sliced sprite created in step 5, I added a collider and UIDragCamera script to it. Setting the draggable camera to View's camera

From here I can drag around the contents of the view but can't interact with any of the buttons, did I miss a step or is there a gotcha somewhere?

5
That's exactly what I was looking for, thank you

6
NGUI 3 Support / position issue with dynamically created buttons
« on: May 28, 2012, 07:54:15 PM »
Trying to dynamically build an interface, but when I add buttons through code their positions end up all messed up, I'm trying to add a button at position 0,52,0 on the current panel that the script is attached to like so:
  1. GameObject newButton = NGUITools.AddChild(gameObject,buttonPrefab);
  2. newButton.transform.position = new Vector3(0,52,0);
  3.  

but for whatever reason the position ends up at a weird position like 11621, or 19967.5 depending on the resolution, but when I change it in the editor while it's running, the button goes to the position I want it to, is there a step I'm missing to not have the new button set to a weird position

Pages: [1]