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 - abhaya.agrawal

Pages: [1]
Misc Archive / IPhone X resolution
« on: March 28, 2018, 04:42:37 AM »
Currently I am using NGUI 2.6.5. Currently It is supports all the iOS resolutions except Iphone X.  i have to set resolution for IPhone X (1125 X 2436) what should i do so that it doesn't effect other resolutions.

@Aren : I can do that. But I want whenever any menu is there if I click on any objects which are not covered by menu, should not respond.

also when i click outside, I want that the menu should close.

There are so many objects in my game. and all of them have the collider to detect touch. Whenever I open menu and i touch any option on that the background object also detect the touch.

what can i do to stop this.

NGUI 3 Support / add function on button at runtime
« on: July 10, 2015, 10:07:22 AM »
I want to add function at runtime on UiButton which is in another script

gameObject.GetComponent<UIButton>().onClick.Add(new EventDelegate(another_script_obj, "Call_Ui_Check_Collision()"));

its not working.

When I am using

 if ( == "appliance")

i am getting null reference error in unity=> NullReferenceException: Object reference not set to an instance of an object

i want to get name of the object, which i am clicking or touching.


When I am using its remembering that and even if I am not clicking on that button, I am clicking some where outside , its calling that function. what can I do to ignore this problem???

Thanx alot :) you are right my approach is wrong. btw UICamera.lasthi is working superfine with me. thanx alot. :)

So I am adding buttons to scroll view dynamically inside grid and storing all those inside a list. buttons are inside a prefab. in Prefab there are two buttons.

suppose i added 5 prefab inside grid. When i click on any button, I want to get the name of its parent.

I am using raycast hit to get the name. is there any other way to get the name.

this is my code.

void GetParentName()// i am calling this function when clicking on or off button.
        if (Input.GetMouseButtonUp(0))
            Ray ray = cameraUI.ScreenPointToRay(Input.mousePosition);

            RaycastHit hit;

            if (Physics.Raycast(ray, out hit ,1000.0f))
                Debug.Log("i am inside raycast");
                if ( == "ON_Button"
                    || == "OFF_Button")
                    parentNum = int.Parse(;

Yes button is attached.

When i am changing it on mouse click its changing and instantly going back to previous sprite.

this is the code i am using.

 public void Local()
        localButtons.GetComponent<UISprite>().spriteName = "local_inner_shadow";
        cloudButtons.GetComponent<UISprite>().spriteName = "cloud";

i also tried like this
public void Local()
        UISprite sprite1 = localButtons.GetComponent<UISprite>();
        sprite1.spriteName = "local_inner_shadow";
        UISprite sprite2 = cloudButtons.GetComponent<UISprite>();
        sprite2.spriteName = "cloud";

but same problem is there.

Misc Archive / Graph in NGUI
« on: April 10, 2015, 07:37:31 AM »
Can we make Graph using NGUI?

Pages: [1]