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

Pages: [1] 2
1
NGUI 3 Support / Re: Atlasmaker / Fontmaker problem
« on: July 25, 2014, 09:17:28 PM »
I created a test project with only NGUI 3.6.8 (removing every other plugin) in Unity 4.5.2 and I keep getting this error:

importer.GetNPOTScale() == TextureImporter::kNPOTKeep

I've tried changing the texture type to GUI, Apply, changing it to Advanced, Apply, and it still gives me the error.  Can you advise?  Thanks.

2
NGUI 3 Support / Re: Atlasmaker / Fontmaker problem
« on: July 24, 2014, 07:11:23 PM »
I also have the same problems as focus.  I tried changing the type to GUI, pressed Apply, and then changed the type to Advanced, and then pressed Apply.  I got the same error:

importer.GetNPOTScale() == TextureImporter::kNPOTKeep

It seems like it is reverting the settings of the imported images so that it turns off things like "Alpha is Transparency", etc.

3
NGUI 3 Support / Re: Error occurs when i import NDATA after NGUI
« on: March 27, 2014, 11:00:49 PM »
Also getting this issue after installing the latest NGUI and NData.

4
So what exactly goes into "YourFunction"?  So for example, my GameObject is called "Model", and the script that is attached is "Controller", and the function within "Controller" that I want to call is "UpdatePoints".

5
In NGUI <2.7, I was able to set an eventReceiver for UICheckbox to send an event to another object within my scene.

For example, I have the code:

  1. checkbox.eventReceiver = GameObject.FindWithTag("Model")
  2.  

How do I do this with the new EventDelegate model in NGUI 3?

6
NGUI 3 Support / UIAtlas.Coordinates doesn't exist in NGUI 3?
« on: December 27, 2013, 10:37:36 AM »
Hello, I am trying to generate an atlas at runtime, and in NGUI <2.7.0, I used the following code:

  1.                 UIAtlas atlas = gameObject.AddComponent("UIAtlas") as UIAtlas;
  2.  
  3.                 yield return StartCoroutine(Assets.DownloadAssetBundle(url, version));
  4.                 AssetBundle bundle = Assets.GetAssetBundle(url, version);
  5.                 AssetBundleRequest pngRequest = bundle.LoadAsync(key, typeof(Texture2D));
  6.                 AssetBundleRequest txtRequest = bundle.LoadAsync(key, typeof(TextAsset));
  7.                 yield return pngRequest.isDone && txtRequest.isDone;
  8.                 Material mat = new Material(Shader.Find("Unlit/Transparent Colored"));
  9.                 mat.mainTexture = pngRequest.asset as Texture2D;
  10.                 atlas.spriteMaterial = mat;
  11.                 atlas.coordinates = UIAtlas.Coordinates.Pixels;
  12.                 atlas.pixelSize = 0.5f;
  13.                 NGUIJson.LoadSpriteData(atlas, txtRequest.asset as TextAsset);
  14.  

However, in NGUI 3, I get a Unity error that states that UIAtlas.Coordinates is protected, and atlas.coordinates does not exist.  Can I just delete that line, or do I need to substitute it with another line?  Also, are there any other changes that need to be made to update the above function?

7
Currrently, I have a list of textures that I can scroll through by swiping to the right or left.  However, instead of moving through the scroll view, I want to swipe, which will cause the view to "snap" to the next texture.  Does NGUI have any native support for this, or will I need an external library like FingerGestures?

8
NGUI 3 Support / Re: Removing the Top Bar from the iPhone Keyboard
« on: September 22, 2013, 12:26:34 PM »
I looked at that but there doesn't appear to be any option to turn the top bar off.  Has no one else experienced this issue at all?

9
NGUI 3 Support / Removing the Top Bar from the iPhone Keyboard
« on: September 21, 2013, 10:09:55 AM »
Hello, I am building an iPhone app using NGUI, and am running into an issue with the iPhone keyboard.  As you can see in the attached screenshot, there is a top bar that serves as a preview for the input for the iPhone keyboard.

Is there any way to remove this top bar, or at least remove the margin between the top bar and the rest of the keyboard?  Thanks!

10
NGUI 3 Support / Re: Tweening Position back to Starting State
« on: September 20, 2013, 08:48:26 PM »
Nevermind, found the solution.  It turns out when you press "Enter", it triggers both OnClose AND OnSelect, and the OnSelect was being called after OnClose, thereby overwriting the Tween.

11
NGUI 3 Support / Tweening Position back to Starting State
« on: September 20, 2013, 08:20:44 PM »
Hello,

I have the following code that I have attached to the game object that also contains a UIInput component:

  1. public void OnSelect()
  2.         {
  3.                 Vector3 destination = new Vector3(
  4.                         inputContainer.localPosition.x,
  5.                         targetYCoordinate,
  6.                         inputContainer.localPosition.z
  7.                 );
  8.                 TweenPosition.Begin(inputContainer.gameObject, 0.50f, destination);
  9.         }
  10.  
  11.         public void OnClose(string text)
  12.         {
  13.                 Debug.Log(initialPosition);
  14.                 TweenPosition.Begin(inputContainer.gameObject, 0.25f, initialPosition);
  15.         }
  16.  

The OnSelect code works perfectly, and the object tweens to the correct position.  However, the OnClose function does not work, as the object does not move at all (NOTE: I set up the event delegate in OnEnable() which is not shown here and I know it is working because the Debug.Log(initialPosition) shows up in the console).  When I inspect the TweenPosition component, the "to" property and the "duration" property are both unchanged but the "from" property is.

How can I start a tween to initialPosition?

UPDATE: Even when I use the following code, it results in the same behavior.

  1. public void OnClose(string text)
  2. {
  3.         inputContainer.GetComponent<TweenPosition>().Toggle();
  4. }
  5.  

I am using NGUI 2.6.4.

12
What about when a person deletes a character using backspace.  Does UIInput.validator pick it up?

13
NGUI 3 Support / Refreshing the Sprite of the UISprite
« on: August 30, 2013, 10:19:14 PM »
Hello, I am creating an UIAtlas at runtime using an image from TexturePacker.  I am also using the NData package for NGUI and using that to set the sprite name.  This means that for every UISprite, there is initially a sprite name but no atlas (because I create it at runtime).  Therefore, after I generate the atlas I assign it to each UISprite in separate code.

This works fine in the Unity Editor.  It doesn't work as well on iPhone, where it will show up 50% of the time.  Therefore, I was wondering if there was a way to refresh the sprite so that NGUI would re-render it after I assigned the atlas.  Thanks!

14
Hello,

I am trying to implement a type of live-search functionality where I want to call a function to do some background processing whenever a person enters in a keystroke (or hits the backspace to remove a character).  Does NGUI send an event when this happens?  If so, which event should I be looking at?

15
NGUI 3 Support / Can't Utilize Any Script in NGUI/Editor
« on: August 29, 2013, 10:01:55 AM »
Hello, I am attempting to use NGUIJson in order to import from TexturePacker atlases, but every time I attempt to call NGUIJson or any other script, such as NGUIEditorTools, it gives me that the name does not exist in the current context.  How can I get Unity to compile these scripts?

Pages: [1] 2