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

Pages: [1]
1
NGUI 3 Support / Position Tweener Crashing On Android?
« on: March 20, 2014, 03:58:46 PM »
Everytime I try to use a Position tween on android (acting on a label) I get a null reference on "UnknownFile:0". It works fine in the editor, but doesn't work on the device. It seems as though the callback is never invoked because of an exception somewhere in UITweener.

Has anyone else ran into problems with this?

2
NGUI 3 Support / Re: Remove an Atlas?
« on: March 20, 2014, 01:21:04 PM »
Indeed, I suspect unity has some form of "intelligent" asset caching system. I also posted over there and haven't gotten a response.

Although I am certain the file doesn't exist and is no longer referenced in the project. All Textures converted to sprites now use a new Atlas map that holds everything.

3
NGUI 3 Support / Remove an Atlas?
« on: March 20, 2014, 10:26:51 AM »
I cannot remove an atlas from a Unity build.

I've tried restarting Unity, but it's still listed.

Used Assets, sorted by uncompressed size:
 21.3 mb    15.5% Assets/Textures/Atlas/titleScreenAtlas.png
10.7 mb    7.7% Assets/Textures/Atlas/SinglePlayerAtlas.png

This atlas doesn't exist, nor does this file exist. It did at one point, and now I can't remove It.

What's going on here?

4
NGUI 3 Support / Atlas Trim Alpha not working?
« on: March 20, 2014, 09:30:14 AM »
Hey guys,

I have an atlas that's 21.3MB in unity with only a dozen relatively small textures. It seems to be a 2048x2048 image, when in reality a 2048x1024 would be sufficient. I have the option to Trim Alpha on, but it doesn't seem to be trimming anything..

Is there something I'm missing?

5
NGUI 3 Support / Re: Tween Not Working On Android
« on: March 19, 2014, 08:51:26 AM »
I've surrounded everything with null checks, and nothing comes back as null (expected since I don't see this behaviour on PC).

Yet when I run on android the labels with tweens disappear.

6
NGUI 3 Support / Tween Not Working On Android
« on: March 19, 2014, 07:19:41 AM »
This is from the ADB debug console:

  1. 03-19 09:47:53.706: I/Unity(15424): NullReferenceException: Object reference not set to an instance of an object
  2. 03-19 09:47:53.706: I/Unity(15424):   at UITweener.Update () [0x00000] in <filename unknown>:0
  3.  

How do I even begin to debug this? The issue isn't present on PC.

Edit: There certainly doesn't seem to be a way around this. Other tweens seem to work, I can't begin to understand why this wouldn't. It's not the only tween I have assigned to a UILabel either. I'm just going to have to remove it and perhaps find another solution.

7
Found it, thanks.

Seems to be working, just rather finicky with regards to re sizing everything automatically on me. I'm sure I'll figure it out.

8
Is it possible to set a components center anchor point to the resolution width/4?

I can anchor to Left, Center and Right just fine, but I want to position some elements perfectly centered at the 1/4 and 3/4 marks.

Thanks

9
NGUI 3 Support / Modify EventTrigger From Script?
« on: March 18, 2014, 03:18:59 PM »
IGNORE POST I'm the dumbest human on the planet. My interface gameobject was enabled, but I had *temporarily* disabled the Interface.cs script and thus none of the code I was writing was executing. It works perfectly fine. Sigh.

Hey Guys,

I'm having some issues getting buttons to work. I essentially have a Texture component with an attached Box Collider (adjusted to match button size) and UIEvent Trigger.

From my primary Interface.cs script, I would like to take this texture button, and assign it's callbacks to various functions inside Interface.cs.

Inside Interface.cs, I have something that looks like this:

  1. GameObject helpButton;
  2. ...
  3. helpButton = GameObject.Find("HelpButton");
  4. ...
  5. EventDelegate.Add(helpButton.GetComponent<UIEventTrigger>().onClick, ShowHowToPlay);
  6.  

This is with the intention of adding the ShowHowToPlay() function from within Interface.cs to the button's onClick callback.

  1. void ShowHowToPlay() {
  2.   howToPlayWindow.SetActive(true);
  3. }
  4.  

Admittedly, I do not know how to accomplish this, I am piecing things from various sources.. All of which tend to favor the "just drag your component into the event" which isn't flexible enough for things I know I'm going to need.

Is there a way to do this (I assume so), and if so, what have I done wrong?

Thanks!

EDIT: I have been equally as unsuccessful with adding a UIButton component to the texture with a box collider. Although I assume the AddDelegate code would be incorrect for a button.

Pages: [1]