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

Pages: [1]
1
Awesome, worked like a charm, thanks!

2
So I have a UITable set up and I can add cells and everything no problem, and it scrolls with the cells in there when I click anywhere in the table and drag.  The cell is just duplicates of a prefab with different data in them for each cell.

I'm now trying to make the cells clickable.  I added the UIButton and Box Collider scripts to my cell prefab.  And the click event and stuff happens when I click on the cells.

The problem now though is that when I try to click and drag from a cell, it is hitting the collider for the cell and not the scroll view, so I can't click/drag and scroll the table from the cell.

What is the correct way to do this?

3
Okay...

So I just tried to programmatically scale it with the localScale on the GameObject transform, and it just worked!

So looks like it actually does work like I was hoping.  It's odd that it doesn't work that way when just editing it in the scene while running the game though.

4
NGUI 3 Support / Re: Create Labels in script
« on: March 19, 2015, 09:17:07 PM »
I might be missing something, but why can't you sort the list prior to adding them into the game, so that when you are going through the for loop adding the items, they are already sorted?

5
NGUI 3 Support / How to scale a prefab created out of NGUI components?
« on: March 19, 2015, 08:26:35 PM »
I have a prefab that I created that is a table cell.  The actual cell size is 700x140.

Inside this prefab, I have a bunch of labels that are anchored using the advanced anchor to position everything how I want.

What I'm wondering is, how do I go about scaling the entire thing?

Say for instance, I want to make it 1/2 the size.  How would I go about doing that so that it scales and all of the anchors and what not also scale accordingly, so that the prefab looks identical just 1/2 the size?

I tried setting (not programmatically, just through the Unity Editor) the scale of the prefab in the game scene to .5 while the game was running, and this didn't work at all as I expected.  I figured had that worked, I would just change the localeScale of the object, but since it didn't work, I didn't try that yet.

So any suggestions?

Pages: [1]