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

Pages: [1] 2 3 ... 5
1
`UNITY_VERTEX_INPUT_INSTANCE_ID` should be `UNITY_INSTANCE_ID` in Unity 5.4

Looks like that seems to fix the error  ;)

2
Forgot to add the console errors:

3
NGUI 3 Support / [Shader] Unlit Transparent Colored is Magenta in 3.11.4
« on: August 07, 2017, 02:51:13 PM »
Just updated from 3.11.1 to 3.11.4 and noticed some quirks with the Unlit Transparent Colored shader. It draws everything Magenta, and even shows up as such in the inspector:


4
Started getting this quite often once we updated to Unity 5 (never got it on 4.x.y)

Currently on 5.4.3p4

5
NGUI 3 Documentation / Re: Localization system
« on: May 02, 2016, 06:14:25 PM »
What workflow to you recommend for doing:

  1. string.Format("Example {0}, {1}", param_a, param_b);

Would you do something like:

  1. label.text = string.Format(label.text, param_a, param_b);

or

  1. label.text = string.Format(Localization.Get(key), param_a, param_b);

6
Anyone else run into a state where you can't really click on NGUI things in the Scene View of the Unity Editor?

I try to click on things with my mouse to select them, and just nothing happens :-\

7
NGUI 3 Support / UITexture and WWW == Border Artifact
« on: August 06, 2015, 01:56:25 PM »
We are getting and using a texture at runtime from a WWW object, however, on some devices there is a very subtle border-artifact on the texture.

We've checked the PNG several times in Photoshop, and there doesn't seem to be any issue with the alpha around the perimiter, and as I mention before, not every device shows the artifact.

Any thoughts as to why this would be occurring?


  1. private static IEnumerator button_texture_coroutine ()
  2. {
  3.     WWW www = new WWW(ButtonURL);
  4.     yield return www;
  5.  
  6.     ButtonTexture = www.texture;
  7. }
  8.  
  9. private void refresh_buttons ()
  10. {
  11.   ...
  12.  
  13.     m_button_texture.mainTexture = ButtonTexture;
  14.     m_button_texture.MakePixelPerfect();
  15.  
  16.   ...
  17. }
  18.  

For reference:
I've attached a cropped screenshot where you can see the artifact down the center. Basically a single pixel slight-alpha line

8
How is it rude and dismissive?

Specifically in reference to how you blew him off with your initial reply.

How do you physically detect a finger hovering over a button using touch-screen devices? You can't.

Correct - most devices can't (I know some Samsung devices can). The idea that the property implies is that you want to query if the input in question was over a UI element. And that is a perfectly reasonable question to ask the system.

Similarly, how is "is over UI" check supposed to work with you have more than one active touch, one is interacting with UI and the other does not? Which one should be checked to be is over UI? Keep in mind if you need this functionality with touch-screen devices, then you can always loop through active touches: UICamera.activeTouches. Each of those has a "pressed" object set which tells you the game object where the touch started.

Quite simply, the property would be true if any touch was over a UI element. Once again, that seems very reasonable. Sure, there could be additional methods to determine which one, if we care, but I digress.

Using NGUI input is necessary because it ensures that NGUI's events are filtered properly, going to whatever is on top and preventing whatever is below the widgets from receiving events. You know, the stuff you now have to do manually using the "is over" checks.
Using NGUI system all the way removes the need to do it entirely -- that's exactly the point.

Thinking that the UI system would govern gameplay is incredibly naive, limiting, and also just flat out bad engineering (due to unnecessary coupling).

Now, of course, there is a simple solution to all of this, but the frustrating part was the the behaviour of IsOverUI changed dramatically.

For anyone that does want to find out if the input is over the UI, it's pretty simple, but it does involve a raycast, which is expensive, so clearly you want some gating logic before it gets to this point:
  1.      
  2. if (Input.touchCount > 0 && UICamera.Raycast(Input.GetTouch(0).position)) {
  3.   // Do something or nothing if we are over the UI
  4.   return;
  5. }
  6.  


9
Something like this:

if (UICamera.lastHit.collider != null && UICamera.lastHit.collider.gameObject != UICamera.list[0].gameObject) { // do something }

However the proper solution is like I suggested -- using NGUI events all the way, not your own Input checks. This hack wouldn't be necessary if you stuck to NGUI events. NGUI is fully capable of sending events to all objects, not just UI but 3D as well (if you attach UICamera to your main camera too).

That is not a very helpful solution. Our game input also broke when we updated to 3.9.0b. To assume that NGUI can be the only system processing input is incredibly restrictive to developers.

We had been using IsOverUI to early out of our own game logic input handling. And I find it a bit rude to be so dismissive that IsOverUI shouldn't apply to touch input as well.

10
0.01 is fine.

So, we changed all the tweens to start at 0.01f instead of 0.0f, and we still get the issue where sometimes the tween does not visually complete.

Any other thoughts/ideas?

11
I'm a bit confused then why it works 95% of the time.

But in any case, These should start at 0.01 and scale to 1.0f?

12
So, I have an issue, that usually only occurs on devices, and usually lower end ones (but very occasionally on decent ones).

Logically, as far as the variables are concerned, the tween has finished. If I try to log the values of what is going on under the hood, the tween thinks it did it's job. However, on screen, not so much.

For example, I have some popups that do one of two things. One of them, when it is shown it tweens in from off screen. So it descends from above, and then does a slight bounce and rests in the center of the screen. But sometimes, the popup doesn't visually make it all the way down. It's just stuck half way on the screen. If I turn the screen off/on, then it is in the correct place. Mind you, I run no logic or code for OnApplicationPause/Resume that would affect positions at all. And also note, that I have even logged the variables.

I am seeing similar behavior with a new project, but these popups do a scale from 0=>1, but sometimes, for some reason, they only make it half  way, and just appear on screen at about 0.25f instead of 1.0f.

Has anyone ever experienced this before?
Does my description make sense?

13
NGUI 3 Support / Re: Dynamic fonts downsides?
« on: January 21, 2015, 01:19:04 PM »
Is there any known work-around for missing letters?

The only place I see it is on my toast that I use for debug messages, so end users do not see it, but it would be nice if I could see it on device. FWIW, it was working on that toast for almost 9 months, but now has recently started dropping letters (maybe related to Unity 4.5.5f1?).

14
NGUI 3 Support / Re: [Q] Recommended Texture Compression
« on: June 24, 2014, 11:59:59 AM »
Okay, that's good stuff to know.

I also just quick tested changing all our UI textures to RGB/A Compressed PVRTC 4 bit
The result was... not expected. According to the RAM manager on my Note 10.1 tablet, the game went from 199MB usage up to 214MB.

15
NGUI 3 Support / [Q] Recommended Texture Compression
« on: June 24, 2014, 10:52:05 AM »
What's the recommended texture compression for UI textures/atlas?

Right now we only support Android, but will be adding iOS support in a few months. As you can tell in the attached image, we're chewing up some serious memory, which can limit the number of low-end devices we can support.

Pages: [1] 2 3 ... 5