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

Pages: [1]
1
I fixed this by setting up an anchored invisible widget and tweening the window to this position. This should work on all devices and was the easiest solution for me.

2
Hello!
Sorry if this is a basic question. In my game I want to have a window that slides in (with TweenPosition) and always sits at the left border at all resolutions (android).
Currently the window is too far right on some specific android resolutions. I made an album to show what I mean
http://imgur.com/a/mhSo9

I tried different anchor settings which resulted in the window being cut off at some resolutions which would be the worst case (not being able to read the text). Can you help me please with the anchoring settings so that the window always is left at all resolutions?
( I am using the fixed size on mobiles setting)

Edit: Ah, I think I understood something completely wrong ... Anchors have no effect when using Tween Position, right? So I would have to calculate the Tweening Values for the specific device the app is running on ...
But how would I do this? Any hints? I want the window to slide in from off screen to the very left of the screen.

Thanks!

3
NGUI 3 Support / Re: TweenScale: Update Table not working
« on: May 03, 2014, 05:05:51 PM »
Ok, I checked it during debug mode in the inspector:
The TweenScale instance is definitely finding the parent table and referencing it in the variable "mTable". So what's going on here??

Why is "mTable.repositionNow = true" not working as expected?

Edit: I tried moving the scaleContainer one step up in the transform hierarchy (like it was in the older project) and the table is now updating. However this is not an option for me in this case.... I need the scale containers to be one step lower in the hierarchy or my whole structure becomes really messy.
Why is it not working with two parent elements between UITable and TweenScale? To me this makes no sense right now .. Could you please check this ArenMook? Thanks in advance!

4
NGUI 3 Support / TweenScale: Update Table not working
« on: May 03, 2014, 09:45:15 AM »
Hey!

It is not the first time I set up a widget with TweenScale that updates the table but right now I can't get it working. I don't know what I did wrong this time ...
This is my structure
  1. UITable
  2. ---UIWidget (first container element)
  3.     ---UIWidget (second container element)
  4.         ---UIWidget with TweenScale
  5.             --- elements
  6.             --- ....
  7.  

I just looked into the last project where I used this method and found out that in this project there is one less container element. So this structure:

  1. UITable
  2. ---UIWidget (first container element)
  3.     ---UIWidget with TweenScale
  4.         --- elements
  5.         --- ....
  6.  

Now I thought TweenScale is not able to find UITable because UITable is too far up in the Transform hierarchy.
However I looked into the code of TweenScale and if I understand it right it should search in all parents ...

So what could be going on here?

5
Hello guys!

I'm planning on building a dynamic property menu which collects all properties of an object a user can modify. This menu changes its content when a user selects another object / creates a new object.
The menu itself will contain many sliders, popup-menus, labels etc all organized in a table.

I'm thinking of two possibilities.

1. I could create a table for every new object with the menus inside. When the user selects an object I activate the table belonging to this object and deactivate all others.
(= many tables at a time)

2. I could repopulate the property menu every time the user selects an object. I.e. if an item is selected, the old property menu is deleted and a new table is created holding the menus for the newly selected item.
(= only one table at a time)

With the first option I will eventually have many different tables with many menus each as I'm planning to allow the user to have two figure or even three figure amounts of objects.

With the second option the the menu gameObjects would be created and deleted each time a user clicks on an item. As I'm planning to have a rather complex structure I'm worrying that this could lead to a worse performance than case 1. On the other hand I have the concern that the amount of gameObjects from case 1 will lead to problems with RAM etc ...

I'm deploying to mobile devices!

What do you think is the smartest option? Are high amounts of deactivated NGUI gameObjects (or gameObjects in general) a problem performance-wise? Or do you think it will lead to a even worse performance if I create a complex NGUI structure every time a user clicks on an object.

Thanks in advance!

6
NGUI 3 Support / Re: Delete item on drop
« on: April 01, 2014, 10:36:22 AM »
Everything is working fine now!
Thank you!

7
NGUI 3 Support / Delete item on drop
« on: March 28, 2014, 06:04:33 AM »
Greetings!

I'm stuck at the moment trying to delete a DragDropItem on DragDropRelease. The draggable items are children of a UIGrid which is inside a window. Outside this window I specified a DragDropContainer and the parenting works fine -> I can drag the items out of the grid onto the new DragDropContainer so far.

But how can I read events from the DragDropItem to call additional methods? I think it's kind of trivial but I'm stuck...

I want the following to happen:
1. When the DragDropItem is dragged over the DragDropContainer window I want the Sprite of DragDropItem to turn red (indicating the deleting process).
2. When the item is actually released on the new DragDropContainer I want the DragDropItem to be deleted.

So how can I access these events? I don't need help with the deletion process itself but just need to know how to determine when the item has been released and which gameObject it has been released on.

I have a menuManager class which dynamically creates buttons and subscribes to the button onClick event
(pseudocode: EventDelegate.Add(newButton.onclick, certainMethodInMenuManagerClass) which works fine. I thought I could subscribe to the drag events likewise but the class does not seem to hold these events. :(

Is there an easy solution for this problem?

Thanks in advance!
 

8
NGUI 3 Documentation / Re: UIScrollView
« on: February 26, 2014, 08:28:58 PM »
Thank you!

I know created a class inherited from UIDragDropItem that serves its purpose.

On start I create an array of 10 int values which I then fill with random values between 1 and 5. Now I have a script in my scrollView that grabs this array and instantiates icons for every value in the array as a child of the Grid-Object in the scrollview. '1' results in an instance of iconButton1, '2' in an instance of iconButton2 and so on.

The instantiation works fine and the icons are sorted within the grid (each button has a offset of 75px). However, the instances are created with a z-value of 5400 and a uniform scale of 360 each, although the prefab has the position (0,0,0) and the scale (1,1,1). Do you know what goes wrong during the instantiation process?

I now adjusted the values manually after instantiation but I'm very curious to find the reason for this bug.

9
NGUI 3 Documentation / Re: UIScrollView
« on: February 26, 2014, 03:53:25 PM »
Hey ArenMook,
I'm trying to utilize UIScrollview to build a little button press game.
The first button in the scrollview is supposed to be the current button that the player has to press.
When he hits the right button, I want this sprite to "dequeue" from scrollview (as if dragged out of scrollView manually) and the other sprites to move up to the current position within UIGrid (smoothly). Then I want a new button to be created at the end of the scrollview grid. For dragging the sprite out of the scrollview and vanishing I thought of an invisible second panel with a box collider.
I followed your tutorial, UIGrid with Scrollview and dragging is working fine but now I need to know how to access the 'dequeuing'/dragging out of scrollview from script.
Do you think there is a way to use UIScrollview this way? Or am I on the wrong track!

Btw awesome tool. I bought your plugin last week and am very pleased so far!

Thanks in advance!

Regards! monogon

Pages: [1]