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

Pages: [1] 2 3
1
NGUI 3 Support / Re: Capturing events from a third party asset in a widget
« on: February 22, 2016, 08:33:12 PM »
I managed to get some "reasonable" results by doing creative Screen.w/h math and positioning it that way.  But I will definitely try the UIAnchor approach - a much better solution if I can get it to work with it.  Thanks!

Cheers.

2
NGUI 3 Support / Re: UIWrap Content
« on: February 22, 2016, 03:16:36 PM »
Unless I am just not understanding what you are saying, I'm guessing you have set the transform of some object as the parent of another object (child object).  When you remove the object that is the parent, you have the children trying to access a transform that no longer exists.  You can either temporarily change it via SetParent() to something else, then change it back, or even better - just dynamically change the button info instead of removing it and re-adding it.  Or, you could add them all at once, and keep some hidden, and shuffle them around (make active/hide) depending on what the user is doing.

Cheers.

4
NGUI 3 Support / Re: Popup out of canvas
« on: February 21, 2016, 07:41:41 PM »
Wait, are you using a UIPopupList? If so, you shouldn't have to do anything to it.

5
NGUI 3 Support / Re: Popup out of canvas
« on: February 21, 2016, 02:40:48 PM »
Have you tried anchoring it in a widget in the panel you want it to pop up in?

Cheers.

6
NGUI 3 Support / Re: Capturing events from a third party asset in a widget
« on: February 18, 2016, 08:19:20 PM »
Let me pose another scenario, as I am trying different things to get this to work.

I am trying to anchor this third party asset (in layer called "X") to an NGUI widget (in the "NGUI" layer).  I do this by adding a UIWidget component to the third party asset, then setting its transform to the NGUI widget's transform.  Sadly, this doesn't seem to work either.  No matter what I do, I get it in the center of the screen, rather than where I want it (lower right of the screen).  But at least it works.  Just doesn't seem to be anchoring properly or something.  Shouldn't this be possible, or no? Do all anchored assets need to be in the same layer as the NGUI stuff?

Thanks!

7
NGUI 3 Support / Re: Capturing events from a third party asset in a widget
« on: February 18, 2016, 07:53:40 PM »
Actually, the more I think about it, I don't think what I am trying to do is possible.  I need to figure out some other approach I think.

8
NGUI 3 Support / Re: Capturing events from a third party asset in a widget
« on: February 18, 2016, 07:36:19 PM »
I should add what is actually happening.  When I flip the debug option on the UIRoot camera, it shows the info for the third party widget when it shouldn't.  That widget's events should be picked up by the main game camera.  Also, nothing else on the UI works except stuff in the NGUI layer. :(  If I remove the UICamera script from my main camera, everything works except for the third party widget.

9
NGUI 3 Support / Re: Capturing events from a third party asset in a widget
« on: February 18, 2016, 07:29:06 PM »
That's the thing, I have a UICamera script attached to my main camera as well.

10
NGUI 3 Support / Re: Disable whole UI
« on: February 18, 2016, 09:37:16 AM »
I would say temporarily override the event mask for that UI Camera.

Check out UICamera.eventReceiverMask ... though not sure if it can be adjusted at runtime via script or not.

Cheers.

11
NGUI 3 Support / Re: UITexture custom shader not working at all.
« on: February 17, 2016, 11:14:31 AM »
If your code/experiment isn't anything proprietary, feel free to bundle it up and post a link to it.  Happy to take a closer look and see what I can find, if anything.

Cheers.

12
NGUI 3 Support / Re: UITexture custom shader not working at all.
« on: February 17, 2016, 10:53:42 AM »
Are you doing anything else funky involving NGUI after you add the shader?  Maybe something under the hood is switching it back?

Still learning NGUI myself, but happy to be a separate set of eyes for you, as it were.

Cheers.

13
NGUI 3 Support / Re: UITexture custom shader not working at all.
« on: February 17, 2016, 10:33:38 AM »
Try assigning the shader via code after you set your texture, if you haven't tried that already.  Untested, and off the top of my head:

  1.  
  2. Renderer r = go.GetComponent<Renderer>();
  3. r.sharedMaterial.shader = Resources.Load<Shader>("YourShaderDirUnderResources/ShaderNameWithNoExtension");
  4.  
  5.  

Cheers.

14
NGUI 3 Support / Re: UITexture custom shader not working at all.
« on: February 17, 2016, 10:20:42 AM »
Do you have a code snippet or two we could look at?

Cheers.

15
NGUI 3 Support / Re: Capturing events from a third party asset in a widget
« on: February 17, 2016, 09:35:43 AM »
Building on to this thread a bit.

Can I assume that if a layer is culled to a specific camera, that only that camera can process events for widgets on that layer?  What I am trying to do may be impossible - not sure.  I'm trying to get this third party asset (that has a widget component that I added to it for layout purposes) to be managed by NGUI for the purposes of layout/anchoring, but have its events processed by a separate camera.  Any thoughts out there?

Pages: [1] 2 3