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

Pages: [1] 2 3 ... 6
1
Can you please elaborate how you corrected the breakage? The same sequence of events happened with my Unity project and I tried clearing the Library and Temp files and re-imported all the assets.
Git shows no changes to the Atlas files but Unity is not reading the Atlas correctly. The images in "View Sprites" are all messed up  :-[
It was quite a while ago; but if I recall, what I did was reset the broken parts to my last git commit to repair them.

2
NGUI 3 Support / Is there a way to use TextMesh Pro for input fields?
« on: September 22, 2015, 08:54:22 AM »
Subject pretty much says it all; I would like to be able to use TextMesh Pro for all text output because the quality is so much better than with normal bitmap fonts and Unity dynamic fonts.

Many thanks

3
In the project that I am currently working on we need "Point" filtering on the generated atlas. Each time the atlas is re-generated we have to manually select "Point" filtering.

It would be much easier if nGUI could either a) retain the previous selection or b) allow selection within the atlas maker window.

As always, keep up the great work!

4
NGUI 3 Documentation / Re: UIPopupList
« on: July 26, 2014, 06:48:54 AM »
Interesting, since restarting Unity the problem no longer occurs in the original scene, neither does it occur upon creating new popup controls.

I was able to reproduce this yesterday without issue...

Nether-mind, it seems that it has sorted itself out! Thanks.

5
NGUI 3 Documentation / Re: UIPopupList
« on: July 25, 2014, 08:02:34 PM »
I am also having an issue with colliders. I have used the option Extras | Switch to 2D Colliders with the "Control - Colored Popup List" prefab. The button part of the control shows the popup fine; but the item entries cannot be selected.

Am I doing something wrong? Perhaps I have forgotten to configure something somewhere?

Edit 1: It seems the 2D box colliders reappear when fiddling with "Size Y" value of the box collider and work for one go. The next time the popup is shown they cease to work again...

Edit 2: Increasing the font padding from Y=4 to Y=8 seems to do the trick...

6
NGUI 3 Documentation / Re: UIPopupList
« on: July 25, 2014, 07:53:31 PM »
It would be very useful if we could either a) get the zero-based index of the selected item or b) associate a private identifier with each item.

The display label isn't always unique which makes it impossible to determine which item has been selected...

For instance, in HTML you can have this:
  1. <select>
  2.     <option value="private-value-1">Visible Label 1</option>
  3.     <option value="private-value-2">Visible Label 2</option>
  4. </select>
  5.  

7
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 23, 2014, 06:00:19 PM »
The previous fix has been working great! I haven't updated to the latest version of NGUI yet, but adding those early-outs has made the GIT workflow a breeze :)

8
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 21, 2014, 07:52:54 AM »
SetDirty should be there. I'm not sure if it was you I emailed back or not, but the root of the issue seems to be the fact that Unity executes OnValidate function in scripts on prefabs, even if prefabs are not instantiated, or selected. 3.0.9 f3 should have this resolved by exiting out of OnValidates early if the game object is disabled.
Yes, it was me you e-mailed!

It seems that usage of SetDirty within the context of OnValidate is the cause of the problem when importing the project for the first time. The early-exit strategy seems to work perfectly in my trials today. It hasn't failed once.

Thanks for the fix! My client will be so happy now that they don't have to perform odd fixes each time they pull from the repo :)

9
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 20, 2014, 08:27:30 AM »
Okay, I have found the troublesome lines of code in NGUI source:

UIWidget.cs : MarkAsChanged
Occurrences of:
  1. UnityEditor.EditorUtility.SetDirty

Removing these fixes the problem.

10
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 20, 2014, 08:06:59 AM »
If "mFG.drawRegion = new Vector4(0f, 0f, 1f, 0);" is removed from the minimal version, the issue does not occur. So it seems to be related to this...

The problem seems to be caused by ExecuteInEditMode in the other NGUI scripts. I have removed that attribute from the bare-bones repro case of `UIProgressBar` (as you can see above).

For the purposes of testing I have:
1. Removed all references of "ExecuteInEditMode" from the NGUI scripts.
2. Naturally this does not preview in edit-mode anymore.
3. Problem no longer occurs when testing using play-mode. The former problem occurs in edit-mode and play-mode since Unity damages the asset.

So it looks like ExecuteInEditMode is causing an issue when Unity is regenerating its asset database. I haven't used this attribute in my own asset and do not really understand its quirks. Hopefully this will help.

11
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 20, 2014, 08:01:45 AM »
The font must be in your Assets folder. That's the only way it's ever going to work. If it's not there, then there isn't going to be any .meta file alongside it. No meta file means it won't be stored in the repository. Not being stored in the repository means no references to keep.
As you will see in the video and the demonstration projects which I have sent you, the font assets are in the project folder. I also have them installed into the Fonts folder on Windows and Mac for use in Photoshop :)

Clarification on former wording: I only installed the fonts into the OS's so that I could use them in Photoshop. Unity naturally requires the font as an asset in the project.

12
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 20, 2014, 06:18:53 AM »
Okay, I have traced this problem to its root with a lot of trial-and-error. The problem is caused within one of the parent classes of `UIScrollBar` which is the `UIProgressBar` script.

The following is the bare minimal representation of the script which causes this issue to occur. I didn't bother inlining `ForceUpdate` since I figured that retaining the structure would help you to see where it came from. This is the bare bones implementation of the `UIProgressBar` class which leads to the problem occurring:

  1. using UnityEngine;
  2.  
  3. public class UIProgressBar : MonoBehaviour
  4. {
  5.        
  6.         [HideInInspector][SerializeField] protected UIWidget mFG;
  7.        
  8.         protected void OnValidate ()
  9.         {
  10.                 ForceUpdate();
  11.         }
  12.        
  13.         public virtual void ForceUpdate ()
  14.         {
  15.                 if (mFG != null)
  16.                 {
  17.                         mFG.drawRegion = new Vector4(0f, 0f, 1f, 0);
  18.                 }
  19.         }
  20.        
  21. }
  22.  

I have spent some time minimizing the number of scripts in the NGUI assets folder. My GIT commits (made whilst minimizing the repro project) might be useful for you. I will send you the updated GIT project in a moment.

I hope that this helps to reduce the problem further for you :)

13
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 20, 2014, 04:52:53 AM »
"Installed"? The TrueType font should be a part of your project.
Just in case that question was directed at me:

I only have the font installed for work in Photoshop. I would expect the Unity asset importer pipeline to deal with the font. Unity only breaks the font reference the first time it updates its asset database from a GIT repository.

Added: I am going to spend some time today trying to figure out why the scroll bar class is causing this problem by stripping it back.

14
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 19, 2014, 03:43:57 PM »
Quote
are the fonts installed on all machines?
In my case the fonts do happen to be installed.

15
NGUI 3 Support / Re: Problem with dynamic fonts and source control
« on: January 17, 2014, 12:12:26 AM »
I don't have a DropBox account at the moment, so I have sent the file to you using WeTransfer which avoids cluttering your inbox with attachments. I hope that this is okay for you...

Pages: [1] 2 3 ... 6