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

Pages: [1]
1
NGUI 3 Support / How do I keep a UISprite from going off-screen?
« on: June 11, 2014, 03:17:35 AM »
Hello,

I have a UISprite which follows an NPC character (an "alerted" icon) and currently if I turn away from the NPC the UISprite goes off screen (because the character is now behind us).

But I would like to actually keep the UISprite on screen, just hugging and sliding along the sides of the screen rather than disappearing altogether. What would be the best way to achieve this behavior?

Thanks,
Seith

2
NGUI 3 Support / Forcing a UIPopupList to close?
« on: March 15, 2014, 05:55:29 AM »
Hello, I'm trying to get a UIPopupList to close via scripting. So far the only thing I found is ".isOpen" but that can only be queried. Is there a way to actually close the popup? Thanks...

Just to be clear: this is to be able to close the popup without actually validating the current selection, in effect canceling the popup action.

3
NGUI 3 Support / Giving focus to a UIButton
« on: February 19, 2014, 12:37:27 PM »
Hello, I have a couple of buttons that I show and hide as my game UI requires but the problem is I don't know how to give focus to a button after I just activated it. The UI is manipulated via a x360 gamepad and I would like to be able to navigate between the buttons by using the left analog stick up/down.

But as I said I need to highlight ("hover") a specific UIButton so that pressing a button on the gamepad will trigger the OnClick method of said UIButton.

4
NGUI 3 Support / Same user input to show and hide a panel?
« on: January 30, 2014, 09:10:49 AM »
Hello, I have a very basic question: Pressing the "B" button on the gamepad activates a panel in which lies a UIButton. But this UIButton's action is to close the panel when it is clicked. So when I press "B" on the gamepad the panel shows up (just the alpha toggling to 1) but as soon as I release the button the panel of course hides itself (alpha back to 0) because the UIButton does its job.

It's a typical case of the snake eating its own tail. What would be the proper way to achieve this simple behavior (same user input to show and hide a panel)? Thanks...

5
NGUI 3 Support / Discrepancy between scenes with new anchoring system
« on: December 20, 2013, 07:36:28 AM »
Hello,

I'm seeing a strange discrepancy from one scene to another with the new anchoring system. I'm simply telling a UILabel to follow an object on-screen using:

  1. objectUILabel.leftAnchor.target = objectLabelTarget;
  2. objectUILabel.rightAnchor.target = objectLabelTarget;
  3. objectUILabel.topAnchor.target = objectLabelTarget;
  4. objectUILabel.bottomAnchor.target = objectLabelTarget;
  5.  
The UI Root (2D) in both scenes points to the same prefab (and I made sure to click "Revert" so both are the identical, sitting at the world's origin).

Yet in one scene the UILabel is at the correct position on screen (ie: it appears right over the target transform), but in the other scene the label's position is completely offset on-screen (seemingly arbitrarily). I also checked that in both scenes the target transform is at the correct position in space.

So what could cause such a weird behavior if both the NGUI root objects are exactly the same and the target transform is in the correct position in both scenes? I'm a bit at a loss here...

The only difference between the scenes is that in the "correct" one the objects that the UILabel tracks are "in front" of the NGUI root, while in the "wrong" scene the objects are "behind". I don't think this should have any incidence though.

6
NGUI 3 Support / How do I set an anchor target transform through code?
« on: December 18, 2013, 08:44:14 AM »
Hello, I'm simply trying to to set the anchor target transform for a UILabel through code but I can't find the instructions anywhere. So far I tried:

- myUILabel.target = ...
- myUILabel.anchor.target = ...
- myUILabel.AnchorTarget = ...
- myUILabel.anchors.target = ...
- myUILabel.AnchorsTarget = ...
- myUILabel.anchortarget = ...
- myUILabel.AnchorPoint.target = ...

I'm sure it's plainly obvious to everyone but please... help...

7
NGUI 3 Support / UICheckbox has disappeared?
« on: November 13, 2013, 09:36:08 AM »
Hello, I'm sorry if this is obvious to everyone but I just updated to the latest version of NGUI (3.0.5) and I get this error:

error CS0246: The type or namespace name `UICheckbox' could not be found. Are you missing a using directive or an assembly reference?

I looked everywhere in the NGUI folder and I cannot find the UICheckbox.cs file anymore. Could anyone help me please?

8
NGUI 3 Support / Using the Xbox 360 gamepad B button [Solved]
« on: June 23, 2013, 11:59:53 AM »
Hi, I'm using an xbox 360 gamepad and I would like to "click" my menu buttons with the B button instead of the default A button. How could I achieve that, please?

9
Hello, I tried updating to the latest version of NGUI but now I receive an error message and NGUI has disappeared:

Assets/NGUI/Scripts/Internal/UpdateManager.cs(16,14): error CS0101: The namespace `global::' already contains a definition for `UpdateManager'

What am I doing wrong, please?

(Someone just posted about that problem here: http://forum.unity3d.com/threads/185951-Problem-with-upgrading-to-latest-NGUI)

10
NGUI 3 Support / [Solved] UIPopup menu not working?
« on: March 27, 2013, 12:40:32 PM »
Well I feel very silly for asking, since I've spent the last hour trying to make this work, but: are the UIPopupList working in the latest version?

I mean I followed step by step the video tutorial here: http://www.youtube.com/watch?feature=player_detailpage&v=rI1vjXgKVTU#t=460s but the popup menu does not react at all to being clicked. There's no hover color-change, nothing. It's like the control's dead. I don't understand since I've got sliders, buttons, etc... working pretty well now.

Can anyone confirm if that's a known bug? Or more likely a newbie mistake? Thanks...


Update: I checked the example scene for Popup menu and it works. Which is all the more puzzling. So I went ahead and did screenshots of all three elements and their hierarchy and reproduced them to the letter in my scene. Including changing the default Sprite that comes when you create the UIPopup menu control and replacing it with a Sliced Sprite (like in the example scene). But no dice. It still doesn't work.

I'm completely lost...  :(

11
NGUI 3 Support / [Solved] Sliced Sprite problem
« on: March 27, 2013, 08:53:04 AM »
Hi, I'm just trying to use a sliced sprite (I selected the "Sliced Sprite" option in the UISprite's dropdown menu) but I can't see any option to specify the borders width. As a result the whole sprite gets stretched instead of just the inside while leaving the borders intact. Basically Sliced Sprite behaves the same as Simple Sprite...

I'm using the latest version of NGUI on Unity 4.1.1. Can anyone help me please?

12
NGUI 3 Support / Mismatched LayoutGroup.Repaint error!
« on: March 27, 2013, 04:18:10 AM »
Hello, I'm a new user of NGUI and I really like it! :)

Since I'm still a newbie at NGUI though I'm getting an error message that says "ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint". And I can't figure out what I did wrong. Could anyone help me please?

Here's the full error message from the console:

  1. ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
  2. UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayoutUtility.cs:208)
  3. UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayout.cs:233)
  4. UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/Editor/GUILayout.cs:225)
  5. UnityEditor.EditorGUILayout.ObjectField (System.String label, UnityEngine.Object obj, System.Type objType, Boolean allowSceneObjects, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/MonoGenerated/Editor/EditorGUI.cs:4419)
  6. UITextureInspector.DrawProperties () (at Assets/NGUI/Scripts/Editor/UITextureInspector.cs:44)
  7. UIWidgetInspector.OnInspectorGUI () (at Assets/NGUI/Scripts/Editor/UIWidgetInspector.cs:762)
  8. UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/7535de4ca26c26ac/Editor/Mono/Inspector/InspectorWindow.cs:863)
  9. UnityEditor.DockArea:OnGUI()

Pages: [1]