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

Pages: [1] 2 3 ... 6
1
NGUI 3 Support / Why isn't there an UpdateManager?
« on: March 07, 2017, 05:52:24 AM »
I'v noticed it is recommended from several sources to use an update manager that calls the update functions in the all scripts instead of using the usual Update() function on each one.
This article is from unity's website:
https://blogs.unity3d.com/2015/12/23/1k-update-calls/

So I wonder why is there no UpdateManager for NGUI?

2
NGUI 3 Support / Re: How can I simulate hover with mobile touch?
« on: November 13, 2016, 02:15:06 AM »
You will get OnDragOver and OnDragOut notifications on those objects. UIButton.dragHighlight controls what happens with that -- whether the button will get highlighted. Just set that to true in inspector.

Thanks works great!

3
NGUI 3 Support / How can I simulate hover with mobile touch?
« on: October 29, 2016, 09:21:13 AM »
I want to have hover events on objects I pass when dragging the finger on the screen, Just like it was a mouse cursor that triggers the OnHover event.

4
UIRoot is completely optional even if you do use NGUI's sprites. So yes, you can certainly rescale its object as you see fit.

Thanks.
It seems like it works fine besides minor adjustments like the UIScrollView that need to have it's ScrollWheelFactor changed.
I guess it will only occur with some scripts that are world's position depended.

5
NGUI 3 Support / Is scaling up everything after removing UIRoot is ok?
« on: April 25, 2016, 10:33:43 AM »
I'v removed the UIRoot component from it's object ( which is a parent for all the other objects in the game ) since I'm not using ngui's sprites anymore.
However, I'm using widgets and UICamera for events.
Other than that, everything else are meshes.
The reason I'v removed the UIRoot component is that it's dynamic scale is messing up unity's particles.
Is it a good Idea to scale the main object to 1 instead of it's current scale? ( something like 0.0018 ).
Will it mess up the UICamera and UIWidget events? ( OnClick, OnHover etc.. ).

6
I want to simulate this event like the user was really released the mouse button.
Is it possible?

7
Each card would be on its own panel. Adjust the depth of the panel as needed to bring things in front / behind. You can even write a script that will automatically set the panel depth in its Update() function based on the Z position.

UIRoot is not needed for 3D cameras at all. Even if you do use it, keep it as Constrained.

Isn't making an update function that will do it for every object will give a performances hit?
This is a workaround an not an actual solution...
Also I need a real solution for sprites that rotates too so using the z position will not suffice.
Isn't there any line in the ngui scripts somewhere where I can just cancel this behavior and then the objects will just use their z position like all the others?

8
I want to have an object created when I'm start dragging from a certain object.
When the object created it should be dragged instead of the object that was initially clicked.
How can I make it happen?

9
Is there a way to set the alpha the zero and keep the collision?
In panels, widgets, sprites etc...
For now I'm just using alpha 0.001f.
However I'm not sure this is the right way to do it.

10
NGUI 3 Support / Re: UIDragDropItem with perspective camera issue.
« on: February 23, 2016, 01:05:48 AM »
Check what the Inventory example does that comes with NGUI. UIDragDropItem is for 2D UIs.

Thanks but it seems like in this scene the mouse corsair get an sprite attached to it.
I need is an actual 3D object that rotate around while dragging it and also changes it's height dynamically depends on the place it is hovering on on the scene.

11
NGUI 3 Support / UIDragDropItem with perspective camera issue.
« on: February 22, 2016, 09:34:34 AM »
When Using this script on an object which has localPosition.z value different then zero, It will have an offset from the mouse position.
Is there a way to make it consider the object's z value?

12
Ok i'v solved my problem by making a custom tweener that uses NGUIMath.SpringLerp.
It would be awesome if it could be done with the default TweenRotation so I can use the animation graph also.

13
When I'm using it, from time to time it will make almost a full circle in order to rotate only 15 degrees.

I only need a fix for when I have an item which has a rotation which is not zero in the z axis and I want it to zero it smoothly.

Edit: I'v noticed it happens only for rotations that will start with a negative value. That means more then 180.
It appears like it will only rotate clock-wise, Is there a way to change it?

14
Like so:

15
I'm using this code to restart a tween every time I play it, It works great for Style.Once.

  1.         tweenPosition_.from = transform.localPosition;
  2.         tweenPosition_.ResetToBeginning();
  3.         tweenPosition_.to = destination;
  4.         tweenPosition_.PlayForward();

But when I use Style.PingPong, It will will reset the animation but from the last starting point.
It means that if it started the "pong" animation, It will restart it from that "pong" and not from the "ping" state ( from the end instead of the beginning ).
How can I totally reset it?

Pages: [1] 2 3 ... 6