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

Pages: [1]
1
I seem to be having the same issue as this forum post in iOS with stripping enabled:

http://www.tasharen.com/forum/index.php?topic=3277.0

Our game requires stripping, so if that is the issue I'm not sure how to solve it. It also seems to happen after a LoadLevelAdditive.

Here is my exact error in xCode:
  1. NullReferenceException
  2.   at UnityEngine.Component.get_transform () [0x00000] in <filename unknown>:0
  3.   at UIDrawCall.get_cachedTransform () [0x00000] in <filename unknown>:0
  4.   at UIPanel.UpdateDrawCalls () [0x00000] in <filename unknown>:0
  5.   at UIPanel.LateUpdate () [0x00000] in <filename unknown>:0

2
NGUI 3 Documentation / Re: UIScrollView
« on: June 10, 2014, 02:59:05 AM »
The issue I'm having looks like it involves UICenterOnChild. The issue seems to be that the center child is not exactly in the center of my scroll view, and it seems when it executes for the first time in Play Mode this causes the content of my ScrollView to snap to the center causing the movement. I know I can manually try to drag the content to the center in the editor, but this seems like it could be a lot of guess and check work with all the different scenes I have with ScrollViews and CenterOnChild. Would it be possible to have UICenterOnChild be able to Execute the script in the Editor when not in Play Mode (similar to how UIGrid's right click Execute Script works), so that we can just execute the script and then save the scene to have everything automatically aligned?

3
NGUI 3 Documentation / Re: UIScrollView
« on: June 07, 2014, 12:18:27 AM »
Awake() should be used for initializing script's local values. It should never be used for modification of other scripts or their values.

Sorry, I should have been more specific. I don't call any Awake code or do anything special in my script that touches the UI. I just meant since, I've updated to 3.6.1, and 3.6.2, the UIScrollView I setup started to do the behavior I mentioned. I thought it might have to do with changes that were made in the Awake or Start of the NGUI UIScrollview script in v3.6.1.

Is there any code I can call to force the UIScrollview not to move when my scene starts?

4
NGUI 3 Documentation / Re: UIScrollView
« on: June 06, 2014, 07:31:06 PM »
I the latest update my ScrollView is fine in the editor when not in play mode. Once I enter play mode though, on the Awake method something is happening that causes my ScrollView buttons to move downwards slightly then move back up to their correct position. It seems to be awake and not enable because when I deactivate and then activate the UIRoot, it does not do that again. Do you have any suggestions to correct this issue?

5
So from as far as I can tell there seems to be 3 ways to setup a UI system that is based off the GameState changes in Unity and they are:

1) Load a new scene for each GameState change which has the new UI.

2) Load a prefab of the UI for the GameState change.

3) Have all the UI gameobjects scenes in the start scene with DontDestroyOnLoad, and then active/deactivate them as the GameState changes.

I was wondering if anyone could offer any feedback or advice on which implementations they've done in their games especially with regards to what works best with NGUI, and which seems to be the best for mobile?

6
NGUI 3 Documentation / Re: UIWidget
« on: April 04, 2014, 05:30:22 PM »
I had a question regarding Anchors on UIWidgets and UIPanels. The way my game structure is setup, I set all my cameras in the first scene, then I load the separate UI scenes in with LoadLevelAdditive.

I'd like to base all my NGUI Sprites and elements positioning anchors off of my Camera's 4 corners, but because the camera is set at runtime, and not in the UI scenes ahead of time. I was wondering what's the best way to setup the UI scenes so that they can be anchored correctly.

7
NGUI 3 Documentation / Re: UIScrollView
« on: March 23, 2014, 02:22:32 PM »
It looks like 3.5.5's Grid Pivot Point option fixed everything. :) Thanks.

8
NGUI 3 Documentation / Re: UIScrollView
« on: March 21, 2014, 06:35:10 PM »
I looked back through this thread and found this conversation between us:

ArenMook:
Place UICenterOnChild on the same object as your Scroll View. It will use the children's positions to determine what's closer (in your case -- Grid objects). So I suggest you make sure that the positions are centered. I wouldn't use UIGrid in your case as it's always top-left based instead.

AbsurdInteractive:
We were using UIGrid so that out level buttons were nicely placed in nice and neat 3x4 fashion for each page.
Is there a way to make the UIGrid not top-left based? If not is there an alternative to keeping UIButtons nicely grid like, but with center based?

ArenMook:
I'm going to change the UIGrid to make it possible to change the pivot in a future update. Right now it's always top-left. You can edit it to support other methods if you like, or just create a simple positioning script yourself to do that. transform.childCount gives you the number of children. Knowing that you want certain number of columns, iterating through the children via transform.GetChild(i) and changing its localPosition is a trivial matter. Afterwards, offset the grid object's position by number of columns * 0.5 * cell width.




Did you change how the UICenterOnChild works in the update since? Did I guess my problem is perhaps the custom pivot code I wrote got wiped out in the update? Or does UIGrid support custom pivot points now?

9
NGUI 3 Documentation / Re: UIScrollView
« on: March 21, 2014, 06:26:30 PM »
I thought I remember you mentioning earlier that we should have the UICenterOnChild script on the UIScrollView gameObject?

I have two grids as each grid is a set of 9 buttons which makes a page for us. I'll try the layout you suggested. It's weird that it was working before the update.

10
NGUI 3 Documentation / Re: UIScrollView
« on: March 20, 2014, 06:19:46 PM »
In the inspector, before I play the scene, everything looks correctly positioned.

Here's my NGUI hierarchy:

Container
|-- ScrollView
     |-- Grid
          |-- UIButtons x 9
               |-- UILabel child in each UIbutton
     |-- Grid
          |-- UIButtons x 9
               |-- UILabel child in each UIbutton


My Content Origin is Top.

EDIT:
Ok, so I have a UICenterOnChild script attached to my scrollview gameobject. When I set the Spring Strength to 0 in the UICenterOnChild component and play the scene the buttons show up correctly in the right position.

The problem though is I really need the Spring Strength for paging. I had it set to 8. Is there a way to just tell it to not use SpringStrength on Start, but only when the user touches/clicks the scrollview? I might add I'm not 100% sure the Spring Strength is the issue though.

11
NGUI 3 Documentation / Re: UIScrollView
« on: March 19, 2014, 07:17:04 PM »
Our ScrollView seemed to be working properly until we updated to the latest version of NGUI from the Asset store just today.

When the scene would start our scrollview would be in the correct position, but now when the scene starts it moves downwards with some motion a little bit which now offsets all of our buttons. I was wondering if you might have any suggestions on what we should look at to fix this?

Before:
http://imgur.com/wTsQXFH,ARA9bJz#1

After:
http://imgur.com/wTsQXFH,ARA9bJz#0

12
NGUI 3 Documentation / Re: UIScrollView
« on: January 25, 2014, 06:29:17 PM »
We were using UIGrid so that out level buttons were nicely placed in nice and neat 3x4 fashion for each page.

Is there a way to make the UIGrid not top-left based? If not is there an alternative to keeping UIButtons nicely grid like, but with center based?

13
NGUI 3 Documentation / Re: UIScrollView
« on: January 24, 2014, 08:00:10 PM »
We've setup a Vertical ScrollView as mentioned, but our paging doesn't really seem to work. We have two grids of 12 UIButtons each parented under the ScrollView.

The layout is like this:

Container
|-- ScrollView
     |-- Grid
          |-- UIButtons x 12
     |-- Grid
          |-- UIButtons x 12

If you swipe upwards really fast it will pop to the next "page" grid, but if you click and drag upwards the paging will not happen and the scrollview will stop in-between the 2 pages, which is undesirable. Is there a way to make sure that no matter whether the player wipes or drags that the scrollview will pop to the closets page?

14
NGUI 3 Documentation / Re: UIButton
« on: January 23, 2014, 03:22:01 PM »
If you want to make a UIImageButton, do you attach a UIButton script and UIImageButton script to the same gameobject? Or do you just attach the UIImageButton script?

Pages: [1]