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

Pages: [1]
1
NGUI 3 Support / UIGird, UIScrollView and dragging
« on: January 26, 2015, 02:42:41 PM »
Hello

Im having hard times trying tring to solve some problems in making a UI for mobile using UIGrid and UIScrollView. (and UIDragScrollView,UIDragDropItem)

I tries some approaches, each time came close to solve...anyway I will explain the UI:

-I have 8 items inside UIGrid ordered horizontally.
-The UIGrid is inside a UIScrolView to enable dragging them left and right.
-order of item should not be changed
-I need also to have the option to remove items by dragging them up or down
-a very small drag(defined) should return them to their position,  a larger removes them
-there is a button -when pressed it return all the removed items (with original order)



Well I already managed putting the items in the grid,scrolling them and being able drag up and down each item .
the problems I encountered are :

1.When being dragged each item is temporary removed from the grid by the UIDragDropItem code ,than if it returned to the grid its being moved to the end- by the UIGrid.
2.To remove item from the grid mean - to loose its order , I tried remove by disabling it and using the HideInactive feature,  still it removes to the end
3.If i want to show all removed items there is no add method with position, I can remove them all and read them, however The GetChildList method which is commented to be used for removing some items is not so useful - after I change the list, How do I set it?
4.The UIScrollView stop working after some dragging item up and down - It might be because i saw the UIDragScrollView is being disabled by the UIDragDropItem  (and the colider too) , and sometimes its stayed disabled but I'm not sure
5.The UIGrid itslef is re positioned sometimes (like when all items are removed) - becoming invisible because its Y is out of the screen
I didn't figure which component re position it because its not my code
6.The UIGrid become disabled in runtime, this is OK?
7.dragging fast to the right returns the items back which is great, but to the left if there are less items than 8 (after being removed) ,its not always returns - I tried changing positions and Pivot of both the grid and the scroll.

Thank you
Tsahi

2
NGUI 3 Support / Sprite Shrinks instead of moving when anchored
« on: November 26, 2014, 09:21:40 AM »
Hello,

I Have this layout inside a UIPanel
UILabel1
UI2DSprite
UILabel2

The content of the labels changes at runtime and is multi line

I  set the anchors of all 3 like this :
left and right to the UIPanel
Bottom to none
Top -each one to the one before it

when I put text in UILabel1 the sprite shrinks instead of moving down
when I click on snap in the sprite Widget in the inspector becomes OK

How to set it properly? or maybe how to call that snap in runtime?


3
NGUI 3 Support / Camera and UI root settings
« on: November 25, 2014, 06:46:52 AM »
Hello
I'm having hard times settings the camera and the UI root to be sized properly look good.

I'm developing a 2D game for mobile
my current desired resolution ratio is (480 width,800 height)
(anyway these are only my background image setting since on Player settings you define resolution only on Web player)
I currently have simple scene with labels only
Well The UI root has such a small scale by default, and can not be manually resized(Ok I already read about it)
so the thing is I must do to make things scale is to set the camera size
doing so, make me work with font sizes too large.
so I tried changing the viewport rect of the camera - but also I can not change the height and width
together to fit the screen (if  change the width,than changing the height make the viewport become small again).its like the camera size is locked.
I played with the UI root sizes as well(with/without constrains)

Thank you

4
thank you It was solved by setting camera settings , still I'm having problems with the camera. i'll start new post

5
NGUI 3 Support / Re: compilation error
« on: November 21, 2014, 11:44:06 AM »
Well finally, I found the problem - there are missing define symbols in the editor assembly

6
Again - I'm openning the same scenes of the NGUI examples pacakge...when I open them on my own project, the UI is not shown(only some sprites)
I have other issues (like the UI root is so small, some fonts not shown...)
This is why I'm asking, Is there any settings I'm missing?

7
Hello,

Well I just bought NGUI, when I open it in a new project everything is OK, but when I add it to my project, than on every scene I open from the examples, nothing is shown, I also have some problems with NGUI so maybe something is not configured as it should be...

so my question is, are there any Player/Project setting I am missing?

I past on all, also verified the "Raycast hit triggers" is marked.

Thank you
Tsahi

8
NGUI 3 Support / Re: compilation error
« on: November 21, 2014, 06:19:54 AM »
I know...well that is what happens anyway...am I missing something?

9
NGUI 3 Support / compilation error
« on: November 20, 2014, 09:43:04 AM »
hey
I just bought the NGUI, I have some questions, but first thing is I get compilation errors, I don't know if it's NGUI issue but anyway all the errors are from  compiler directives :

#if UNITY_4_3 || UNITY_4_5 || UNITY_4_6
               b2d.center = bcCenter;
#else
               b2d.offset = bcCenter;
#endif
               b2d.size = bcSize;

I have the latest Unity version 4.5.5 , I get the error on the else part...

Thank you
Tsahi

Pages: [1]