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

Pages: [1]
1
The first issue is self-explanatory, but when using Maximize on Play, anchors don't seem to position properly.

2
NGUI 3 Support / Draggable panel (in world)
« on: August 13, 2013, 05:42:35 PM »
I'm using NGUI as the GUI for an in-game computer screen, so it's 3D in the world.



  • Monitor
    • Mesh
    • Panel (UIPanel, UIDraggablePanel)
      • Item (UIDragPanelContents)
      • Item
      • Item

The problem is that UIDraggablePanel moves the object that it's attached to, so I can't get it to clip to the screen, because it's just moving the clipping window. Here's the setup:

Also, is there a way to slow the mouse drag speed?

3
NGUI 3 Support / UIAnchor not allowing me to save scene
« on: June 26, 2013, 06:52:32 AM »
I get an asterisk in the top-left of unity, showing that the scene is unsaved. When exiting it asks if I want to save. It does save properly, but the asterisk remains.

If I disable the UIAnchor on all of my Anchors it will save. Also, if I add a new UI with camera/anchor/panel auto-attached, it saves too (as long as my previous UIAnchor's are disabled).

4
I switched my project from Standalone to Android and now I get this error:

Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs(120,36): error CS0117: `UnityEditor.PlayerSettings' does not contain a definition for `targetGlesGraphics'

  1. #if UNITY_ANDROID || UNITY_IPHONE
  2.                 if (PlayerSettings.targetGlesGraphics == TargetGlesGraphics.OpenGLES_1_x)
  3.                 {
  4.                         maxSize = Mathf.Min(maxSize, 1024);
  5.                 }
  6.                 else
  7.                 {
  8.                         maxSize = Mathf.Min(maxSize, NGUISettings.allow4096 ? 4096 : 2048);
  9.                 }
  10. #endif

It's also in UIPanelInspector line 185.

Commenting them out allows for export...

5
NGUI 3 Support / Doom 3 style GUI on world objects
« on: February 07, 2013, 03:40:09 AM »
http://youtu.be/o0_kQIlJX_E?t=4m48s

Is this possible with NGUI?

EDIT: Using the Camera Tool to make the Main Camera recieve events makes buttons/etc work fine in the the world. Are there any tips on working with NGUI in this way?

6
NGUI 3 Support / Deselect an object using NGUI's event
« on: December 11, 2012, 10:26:16 PM »
I replaced this code to use NGUI's event system instead:

  1. if (Input.GetMouseButtonDown(0))
  2.                 {
  3.                         Ray ray = Camera.mainCamera.ScreenPointToRay(Input.mousePosition);
  4.                         RaycastHit hit;
  5.  
  6.                         if (Physics.Raycast(ray, out hit, 200f))
  7.                         {
  8.                                 if (hit.transform.gameObject.tag == "PhysicsObj")
  9.                                 {
  10.                                         SelectObject(hit.transform.gameObject); // This is the Event sent.
  11.                                 }
  12.                                 else
  13.                                 {
  14.                                         Deselect();
  15.                                 }
  16.                         }
  17.                         else
  18.                         {
  19.                                 Deselect();
  20.                         }
  21.                 }

Basically, anything outside 200f would do the Deselect, and anything that isn't tagged "PhysicsObj", so I can just click anywhere to deselect things. How do I do this with NGUI events?

Pages: [1]