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

Pages: [1]
1
The workaround I found that works every time is to open up Unity fresh before importing a font.

It definitely was an issue if my computer had slept then woke up but I think also if I had Unity open for a long time.

In any case, closing Unity, opening then selecting my scene and importing worked fine every time.

2
Are you using more than one atlas per panel? As ArenMook mentioned, 1 atlas means 1 draw call for that panel. I always stick with one per panel otherwise you can get some weird stuff happening with depth culling.

Do you really need that many panels? I could see using a few around the sphere, but with a perspective camera you can mess around with the sprite Z depth and it works (as well as 3d rotation etc). I'd think 6 panels would be plenty (if not overkill). Make a box within the sphere, push stuff back to the level of the sphere via Z coords as necessary. But maybe I don't understand what you are doing.

Could also be the wrong tool for the job. I abuse NGUI on a daily basis using it as a sprite manager. It works for me and my usage, but that's not what it was designed for.

3
NGUI 3 Support / Re: Creating a new font crashes Unity 100% of the time
« on: August 28, 2013, 10:01:34 PM »
I don't think the steps to reproduce are going to be helpful since they are basically, "Make a font, like normal." Then sometimes it will crash, sometimes it won't. I can see if I can cut down an existing project into something smaller I can upload that will reliably reproduce the issue. Currently even the workaround of opening a new scene isnt' working (still crashes in a new scene).

Biggest issue is that the atlas ends up corrupted after the crash (despite not saving the scene). The fix for that is to select all the graphics in the atlas and do a "add/update all". This is the biggest problem for me. Crashing is livable (it's Unity, it crashes), but the having to rebuild the atlas is a pita. Then I'm crossing my fingers it won't happen on the next attempt.

I'll try to make a smaller project and upload it to some web hosting so you can attempt to reproduce it.


4
Yeah, still happening to me. It was working fine in a new scene until I had to delete then reimport a font (think I accidentally exported it as 8 bit at first so it was goofy). After deleting it from the atlas and deleting the prefab I tried to reimport and it crashed and continues to crash if I try to create a font.

Time to try the empty scene again. It corrupted my atlas of course, so I had to 'update' all my sprites again. Pain to say the least. Kind of kills my productivity to say the least. Not a good way to keep motivated on a Friday afternoon..oh well....

5
NGUI 3 Support / W7Multitouch experience?
« on: March 28, 2013, 02:40:43 PM »
Anyone using this on windows 7 with ngui? Basically I want the equivalent of mouse down (touch begin) to work with windows 7 like it does on my Android version. Sucks not having buttons show they are pressed down.

I don't need drag or even swipe at this time (so if those are 100% there it won't affect me). Any other solutions would be appreciated as well.

6
NGUI 3 Support / Re: Share Time: Useful align and distribute script
« on: March 22, 2013, 11:09:00 AM »
Awesome, thanks for sharing.

7
NGUI 3 Support / Share Time: Useful align and distribute script
« on: March 22, 2013, 01:05:31 AM »
Hey fellow ngui users. One of my coworkers (well subcontractor, technically) created this script and I thought I'd share.

I've attached an image of what it looks like in use. Use is pretty much how you'd expect. Select the items you want to align or distribute, then choose one of the align/distribute options. Works a charm and has saved me a lot of time.

Code:
  1. using UnityEngine;
  2. using UnityEditor;
  3. using System.Linq;
  4. using System.Collections.Generic;
  5.  
  6. public class AlignAndDistribute : MonoBehaviour {
  7.  
  8.         [MenuItem( "Align and Distribute/Align Left" )]
  9.         static void AlignLeft () {
  10.                 if(Selection.gameObjects.Any())
  11.                 {
  12.                         UpdateX(Selection.gameObjects.Min(go => go.transform.position.x));
  13.                 }
  14.         }
  15.        
  16.         [MenuItem( "Align and Distribute/Align Center" )]
  17.         static void AlignCenter () {
  18.                 if(Selection.gameObjects.Any())
  19.                 {
  20.                         UpdateX(Selection.gameObjects.Average(go => go.transform.position.x));
  21.                 }
  22.         }
  23.        
  24.         [MenuItem( "Align and Distribute/Align Right" )]
  25.         static void AlignRight () {
  26.                 if(Selection.gameObjects.Any())
  27.                 {
  28.                         UpdateX(Selection.gameObjects.Max(go => go.transform.position.x));
  29.                 }
  30.         }
  31.        
  32.         [MenuItem("Align and Distribute/Distribute Vertical")]
  33.         static void DistributeVertical () {
  34.                 if(Selection.gameObjects.Length >= 3)
  35.                 {
  36.                         var top = Selection.gameObjects.Max(go => go.transform.position.y);
  37.                         var bottom = Selection.gameObjects.Min(go => go.transform.position.y);
  38.                         List<GameObject> blah = Selection.gameObjects.ToList();
  39.                         blah.Sort((g1,g2) => (g1.transform.position.y >= g2.transform.position.y) ? 1 : -1);
  40.                         var i = 0f;
  41.                         var t = blah.Count*1f-1;
  42.                         foreach (var go in blah)
  43.                         {
  44.                                 var pos = go.transform.position;
  45.                                 pos.y = top*i/t + bottom*(1-i/t);
  46.                                 go.transform.position = pos;
  47.                                 i++;
  48.                         }
  49.                 }
  50.         }
  51.        
  52.         [MenuItem("Align and Distribute/Distribute Horizontal")]
  53.         static void DistributeHorizontal () {
  54.                 if(Selection.gameObjects.Length >= 3)
  55.                 {
  56.                         var top = Selection.gameObjects.Max(go => go.transform.position.x);
  57.                         var bottom = Selection.gameObjects.Min(go => go.transform.position.x);
  58.                         List<GameObject> blah = Selection.gameObjects.ToList();
  59.                         blah.Sort((g1,g2) => (g1.transform.position.x >= g2.transform.position.x) ? 1 : -1);
  60.                         var i = 0f;
  61.                         var t = blah.Count*1f-1;
  62.                         foreach (var go in blah)
  63.                         {
  64.                                 var pos = go.transform.position;
  65.                                 pos.x = top*i/t + bottom*(1-i/t);
  66.                                 go.transform.position = pos;
  67.                                 i++;
  68.                         }
  69.                 }
  70.         }
  71.        
  72.        
  73.         static void UpdateX (float val)
  74.         {
  75.                 foreach(var t in Selection.gameObjects)
  76.                 {
  77.                         var pos = t.transform.position;
  78.                         pos.x = val;
  79.                         t.transform.position = pos;
  80.                 }
  81.         }
  82.        
  83. }
  84.  
  85.  

To use, put this in a new file named AlignAndDistribute.cs and add it to your project.

If anyone else has any useful homemade tools they use with ngui I'd love to see them  ;D.

8
I'm seeing this in 3.5.7f6 with ngui 2.3.4. It was crashing every time I attempted to create the font (and resulted in a corrupted atlas that I have to update all my graphics in order to fix).

I finally got it to work by creating a new scene that contains nothing before attempting to create the font.

I checked the crash files and nothing useful in there. The scene I had loaded uses ngui extensively though (as in I should probably be using a sprite solution for some of it instead  ;D).. so maybe that's part of the issue. The atlas texture is 2048x2048.

When I attempted in in a bare scene it was really quick and in the scene where it crashes it grinds for a decent amount of time before it crashes.

9
Yay.Unity 3.5.2 is has been release! http://unity3d.com/unity/whats-new/unity-3.5.2

And one of the fixes:

Android: Touch problems related to ICS upgrades on some devices have been fixed.

Hey David, thanks for working with Unity on the fix.

10
Thanks David. Much appreciated.

I had asked Unity about an eta on the next release as they stated the debug crashing issues have been fixed in the next release (after a bug submission to that effect).. they never got back to me.

We got one thrive today and ordered another 4 from another source (after returning the Iconia) and have a lead on a few more, so I'm set for now. Once the fix is out they can grab whatever kind of tablets they want. They needed tablets with a sturdy power connection and only the Thrive and Iconia had traditional barrel connectors (that I've seen so far). Everyone else has skinny little connectors that won't stand up to any real use. But hey, that's what you get with consumer grade stuff. We have a few leads on 12" tablets coming out soon that are a little more geared towards the intended usage.

Thrives have the best power supply anyhow. Looks like a netbook power supply, not a tiny little wallwart or usb charger.

11
Ahhh.. wasn't sure temple run was Unity, but I suspected after hearing the issues. The wife loves that game. Luckily she has an iPad.

This is definitely reducing my enjoyment of being down in Cali (I'm from BC I should be enjoying the sun etc). Oh well, time for bed, I'll find a solution tomorrow.

12
You'd think this would be something they'd post the progress on a little more publicly. Luckily I'm in the position that for the application of the app I can get away with ditching the acer tablet in favour of something running an older version of Android. The problem is finding a bunch of them this week (best buy was out of Thrives).

Acer got back to me and they said there is no way to revert to Honeycomb. They suggested a hardware and software reset. That's a no go as it's still 4.0.3. I don't have the time to be rooting tablets and putting other images on them.

I hope unity gets a fix out quick. This is bad for both Unity and all the devs that use it. I'm not going to hold my breath though as I need a solution in the next couple days.

13
This is a known issue at Unity.  They know what's going on and working on a fix for an upcoming release.

Happen to have the Unity forum thread handy? My google-fu is failing me.

14
Thanks for the quick reply!

ARghh.. why didn't I find that earlier (and on my own)? I assume since min api level 4.0 is on there, 4.0.3 wouldn't be a problem.

Not good. Anyhow, thanks again ArenMook. As always you are super helpful with your users.

15
I have a couple of tablets I'm playing with here. A Toshiba thrive (on Honeycomb 3.2) and an Acer Iconia tab (a200) on ICS (4.0.3).

The Iconia is having issues with ngui buttons. Multiple presses are registered even though only a single press occurs. This does not occur on the thrive.

The interesting thing is it remembers the position of your last touch. If I hit a button it will register once or twice, but then my next screen press (which could be on another button or just empty screen) will register the first click once more then register the new press.

I've tried a bunch of configuration on the tablet side, but this isn't exhibited in other applications (only our own apps using ngui). We created a quick test app of a single button that adds a character to a string on each press, and as per my description it will add 1 or 2 characters on the first press, then if I click elsewhere it will add one more character.

My internet research has shown people are having issues with some other apps on this tablet with ICS (temple run for example, registering the wrong gestures). It's not system wide, just certain applications.

Anyone else experienced this? Any ideas on things to try?

I'm trying to get the 3.2 rom from Acer so I can test Honeycomb on this tablet. I'm not having any issues with the thrive on 3.2 so I'm hoping it's related to ICS.

Pages: [1]