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

Pages: 1 ... 8 9 [10]
NGUI 3 Support / So you want to make health bars...
« on: April 20, 2012, 10:04:01 PM »
Since I get a question about this roughly once a day...


Code: (below... scroll down)

NGUI 3 Support / Latest Version: 2018.3 (December 13, 2018)
« on: April 12, 2012, 01:37:19 AM »
Subscribe to this thread if you want to receive email notifications when a new version becomes available.

Unsure of how to do that? Click the "Notify" button to the right of "Reply".

Want release notes from versions prior to 2.0.0? You can find them here.

NGUI 3 Support / Welcome to the new forum for NGUI!
« on: April 11, 2012, 08:42:58 PM »
It's cleaner, searchable, and overall much more powerful. You can still find the old forum here if you want to browse it for some info. I will be monitoring these forums (in fact, I get email notifications from every single post), so feel free to ask your questions. :)

NGUI 3 Support / Email vs Posting, and me not responding to emails
« on: April 11, 2012, 08:32:00 PM »
Rule of thumb: I respond to every single email I get, except really strange ones such as “can I be your friend?”. If I don’t respond to yours, then your host rejected my email, or you provided an invalid email address. For example:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
SMTP error from remote mail server after RCPT
host []: 550 5.7.1 Client host rejected:
cannot find your hostname, []

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
SMTP error from remote mail server after RCPT TO::
host []: 550 inconsistent or no DNS PTR record for (see RFC 1912 2.1)

Because of this… please make posts instead of emailing me. Posting questions on the boards will not only ensure that I will be able to respond properly, but will also help others who have the same question in the future.

NGUI 3 Support / FAQ: Frequently Asked Questions
« on: April 11, 2012, 08:28:29 PM »
How do I use NGUI with Javascript?

What does this warning mean?
“Parent of “ABC” does not have a uniform absolute scale. Consider re-parenting to a uniformly-scaled game object instead.”

Scales of all parents leading up to your widgets must be (1, 1, 1), with the lone exception of UIRoot. If you do choose to scale something, do so uniformly — meaning all 3 scale dimensions (X, Y and Z) must have a matching value. For example: (0.25, 0.25, 0.25). This means you shouldn’t parent one widget to another. Parent them both to another game object instead.

In my project none of the mouse events seem to affect the UI. Why?

Edit -> Project Settings -> Physics
Raycast Hit Triggers [X] -– must be checked.

How to change the text of a label dynamically?
  1. UILabel lbl = GetComponent<UILabel>();
  2. lbl.text = "Hello World!";

I will be expanding this post with more questions and answers in the future.

NGUI 3 Support / NGUI 2.00
« on: April 11, 2012, 02:37:07 AM »
Next version of NGUI is going to be 2.00. I'm still likely going to be adding a few more things, but NGUI Professional users already have access to it and can use it now. The changes have been fairly extensive, and have a chance of not being 100% backwards-compatible with older versions -- but fortunately all of it is easy to fix and everything was made easier rather than more complicated.

List of changes so far:

- NEW: Redesigned the way UIDragCamera and UIDragPanelContents work, making them much more straightforward.
- NEW: New widget has been added: Scroll Bar. It does exactly what you think it does.
- NEW: UIDraggableCamera script is used on the camera to make it draggable via UIDragCamera.
- NEW: UIDraggablePanel script is used on the panel to make it draggable via UIDragPanelContents.
- NEW: UIDraggablePanel natively supports scroll bars with "always show", "fade out if not needed" and "fade in only when dragging" behaviors.
- NEW: Scroll View (DragPanel) and Quest Log examples have been updated with scroll bars.
- NEW: Reorganized all examples to be in a more logical order -- starting with the basic, common functionality and going up from there.
- NEW: Localization will now try to automatically load the language file via Resources.Load if it wasn't found in the local list.
- FIX: EditorPrefs are now used instead of PlayerPrefs to store editor-related data.
- FIX: Popup list will no longer try to call SendMessage in edit mode.
- FIX: UIEventListener.Add is now UIEventListener.Get, making the function make more sense with the -= operator.
- DEL: Scroll View example that was using UIDragObject has been removed as it's now obsolete.

NGUI 3 Support / Testing the SMF forum
« on: April 10, 2012, 01:29:00 PM »
Just testing as an alternative...

  1.         static public Vector3 ApplyHalfPixelOffset (Vector3 pos, Vector3 scale)
  2.         {
  3.                 RuntimePlatform platform = Application.platform;
  5.                 if (platform == RuntimePlatform.WindowsPlayer ||
  6.                         platform == RuntimePlatform.WindowsWebPlayer ||
  7.                         platform == RuntimePlatform.WindowsEditor)
  8.                 {
  9.                         if (Mathf.RoundToInt(scale.x) == (Mathf.RoundToInt(scale.x * 0.5f) * 2)) pos.x = pos.x - 0.5f;
  10.                         if (Mathf.RoundToInt(scale.y) == (Mathf.RoundToInt(scale.y * 0.5f) * 2)) pos.y = pos.y + 0.5f;
  11.                 }
  12.                 return pos;
  13.         }

Pages: 1 ... 8 9 [10]