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

Pages: [1] 2
1
NGUI 3 Support / Re: iPhone X display NGUI support
« on: February 20, 2018, 02:43:42 PM »
SOLVED.

2
NGUI 3 Support / iPhone X display NGUI support
« on: February 17, 2018, 08:25:24 AM »
Hello,

I read the only one post who talk about this topic (http://www.tasharen.com/forum/index.php?topic=15480.0) but it not is for me.
I have a UI Root and inside it many other UIpanels, UIButtons, etc, all anchored but on iPhone X the result is that the gui go partially off to the edge of the screen.

I tried also with this sample project https://bitbucket.org/p12tic/iossafeareasplugin mentioned in the other post but that sample not is for NGUI. My problem is my app run on all Apple and Android devices, then I can't adjust the widget's offsets for iPhone X only because this will impact on all other devices.

So, definitively, there are solutions (in this case) with NGUI?
Many thanks.

3
NGUI 3 Support / [UPDATE] UIDragObject.OnDrag question
« on: December 04, 2017, 06:51:04 AM »
In the OnDrag event I need to check the drag direction.
Can how check it?
I wrote this code below but when I drag the game object, it always move to the left.
Thanks

  1. void OnDrag(Vector2 delta)
  2.         {
  3.                
  4.                 if (transform.localPosition.x > 0)
  5.                         rigidBody.AddForce (Vector3.right * 20, ForceMode.Impulse);
  6.  
  7.                 if (transform.localPosition.x < 0)
  8.                         rigidBody.AddForce (Vector3.left * 20, ForceMode.Impulse);
  9.  
  10.                 if (transform.localPosition.y < 0)
  11.                         rigidBody.AddForce (Vector3.down * 20, ForceMode.Impulse);
  12.  
  13.                 if (transform.localPosition.y > 0)
  14.                         rigidBody.AddForce (Vector3.up * 20, ForceMode.Impulse);
  15.  
  16.  
  17.  
  18.         }
  19.  
  20.  

4
NGUI 3 Support / Re: Problem with NGUI and GameObject touch
« on: February 19, 2017, 06:22:55 AM »
Hi ArenMook,

Thanks for reply.

I changed the OnMouseDown event in script on GameObject with OnPress(bool isPressed) event. There is a MeshCollider on GameObject, on UICamera I set Event type 3D UI, Event Mask to Everything.

Now the result is that when the button is over the GameObject and tap on button the event triggers but if I tap on GameObject the OnPress event not trigger and I dont understand why.

What's I'm wrong?

-Kafar


5
NGUI 3 Support / Re: Problem with NGUI and GameObject touch
« on: February 18, 2017, 02:28:01 PM »
UPDATE:

I tried to put a EventTrigger script on the GameObject and set it to my MouseDown function. I use NGUI with Vuforia and all it was run pefectly. I use the Vuforia main camera for AR (then to view the 3d models) and UIcamera for my NGUI buttons.

When I run the app I have a NGUI button, pressing it run correctly. When I move the phone camera on a marker and my app shows a 3d model and the button is over it and tap on it the button not reply but reply the MouseDown event in script attached on GameObject (3d model).

Can how to disable the event on game object for handle the button event? Please help.

Thanks

-Kafar

6
NGUI 3 Support / Problem with NGUI and GameObject touch
« on: February 17, 2017, 05:46:09 AM »
Hi,

I have a 3d model in a GameObject who handle a mouse down event doing something and a NGUI button over this. When I tap the button the gameobject handle the touch event but the button not.

I want when I tap the button only this handle the event and not the gameobject under the button. And I want when tap the gameobject only this handle the event and not the NGUI button.

In NGUI Camera I set the EventMask to NGUI only but with no result.

Can how to do this?

Thanks

-Kafar

7
NGUI 3 Support / Sprites, atlas and animation
« on: May 19, 2016, 03:43:48 AM »
Hello,

I need to put into NGUI a lot of sprites about a flag and animate it, I have the sprites, the anim file and the anim controller.

I create a atlas with Atlas Maker and put into it the sprites, then....? I tried to put in a gameobject a UIButton and a UIPlayAnimation but in this last the anim file and/or the anim controller not are accepted. Why? And the atlas where I can put?

I'm sorry but I have a bit of confusion. I don't want to use the animation out of NGUI because my GUI is ALL NGUI.

Please, help me.
Thanks

-Kafar

8
NGUI 3 Support / Re: Page Control iOS style
« on: March 11, 2016, 05:54:58 AM »
Very good suggestion, many thanks man!


9
NGUI 3 Support / Re: Page Control iOS style
« on: March 10, 2016, 05:09:11 PM »
Many people read this thread but no reply.
Please, anyone can help me?

Thanks

10
NGUI 3 Support / Page Control iOS style
« on: March 07, 2016, 11:50:57 AM »
Hi,

I read this old thread but very interesting for me to make a ControlPage like iOS style: http://www.tasharen.com/forum/index.php?topic=8154.0

I tried to run these scripts with the NGUI latest version but I obtain this error: "Assets/NGUIExt/Editor/UIPageControlEditor.cs(10,33): error CS0115: `UIPageControlEditor.drawColor' is marked as an override but no suitable property found to override", anyone have used this PageControl or can help me?

Thanks

11
Hi,

Old thread but very interesting for me.

I tried to run these scripts with the NGUI latest version but I obtain this error: "Assets/NGUIExt/Editor/UIPageControlEditor.cs(10,33): error CS0115: `UIPageControlEditor.drawColor' is marked as an override but no suitable property found to override", anyone have used this PageControl?

Thanks

12
NGUI 3 Support / UIToggle - What is wrong
« on: November 16, 2015, 09:17:26 AM »
Hi,

I created a UIButton and added a UIToggle script.
From another script attached on a camera I need to handle the click button to flash light on/off.
This is the script code portion but when I press the button the compiler not enter in event. Why?
Thanks

public class MenuFixedController : MonoBehaviour
{
   UIToggle myFlashLightButton;

   void Start()
   {
              myFlashLightButton = (UIToggle) GetComponentInChildren<UIToggle>().GetComponent("FlashButton");
              EventDelegate delFlashLight = new EventDelegate (this, "OnFlashLightButtonChange");
         EventDelegate.Set (myFlashLightButton.onChange, delFlashLight);
   }

   void OnFlashLightButtonChange(GameObject go)
   {
      // DO MY STUFF
   }
 }

13
NGUI 3 Support / Re: Vertical toolbar with buttons spaced
« on: October 29, 2015, 10:53:39 AM »
No, not advanced. You see the "Right", "Left", etc? Change them to "Custom".

OK, but please read my previous message, about the back state return.

Thanks

14
NGUI 3 Support / Re: Vertical toolbar with buttons spaced
« on: October 29, 2015, 05:53:04 AM »
Use "Custom" anchor type with floating point values. For example for left and right anchors, 0 means left side, 1 means right side, 0.5 means center, 0.25 means 25% from the left, etc.

Ok, I set that but when I play Unity the anchor return back to set "Unified".
Why?

15
NGUI 3 Support / Re: Vertical toolbar with buttons spaced
« on: October 27, 2015, 07:48:21 AM »
Do you means this?


Pages: [1] 2