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.


Topics - Kafar

Pages: [1]
1
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.

2
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.  

3
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

4
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

5
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

6
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
   }
 }

7
NGUI 3 Support / Vertical toolbar with buttons spaced
« on: October 26, 2015, 07:22:47 AM »
Hi,

I'm working on a vertical toolbar and I need to space the buttons inside to fit the toolbar length.
Can how to do this? With anchors? Can how to set?
Thanks

-Kafar

8
NGUI 3 Support / Handle NGUI buttons to play video with Vuforia
« on: September 05, 2015, 04:15:36 AM »
Hello,

I wrote this request on Vuforia forum also but with still no reply.

I need to play/pause/restart video on Vuforia ImageTarget handling NGUI buttons.

So, I wrote a script to enable/disable buttons and I put this script on a panel contains buttons and I wrote a script for each button to play/pause/restart the video.

The problem is that that scripts seems to do nothing. The buttons show on display all enable but clicking on buttons nothing result.

Maybe the problem is the wrong place I put the scripts? I saw in this line:

VideoPlaybackBehaviour video = GetComponentInChildren<VideoPlaybackBehaviour>():

the video variable return null.

Please, can someone help me?

Thanks


I use Unity 5.3.1, Vuforia SDK 5, NGUI last version

9
NGUI 3 Support / Handle a tween on a panel
« on: August 31, 2015, 04:04:29 AM »
Hi,

I have a panel with buttons with a tween position on the panel to sliding the panel when the user click on it.

Now I need to handle the existing tween on panel programmatically from another script and sliding the panel.

Can how to do that? And what trigger condition I select on tween for this case?

Thanks

-Kafar

10
NGUI 3 Support / Tween position animation on panel
« on: August 27, 2015, 02:58:05 PM »
Hi,

I want make a sliding panel with buttons anchored on top-left of the screen.
I created the anchor game object and inside a panel with two buttons.
If I add tween animation position on the buttons these move when I click on it, but if I add tween animation on the panel this not move.
Why? Isn't possible to add tween animation on a panel with buttons inside it and move the panel?

Thanks

-Kafar

11
Hello,

I'm new on NGUI, I read all tutorials, I tried all available samples BUT I can't understand how to make a simple sliding button menu with auto orientation for mobile.

Please, can anyone suggest me a simple sample code or anything?

Big thanks!

-Kafar

Pages: [1]