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.


Topics - UncleAcid

Pages: [1]
1
Hi,

I know this is a Unity issue, but I'm hoping someone here has had to deal with this as well (and my game is entirely NGUI, so it's not completely out of this forums scope). I've posted on Unity Answers as well, but it usually takes too long to get any real answers from them.

I've got a problem with auto-rotation on Android; when playing my game if I rotate the screen the graphics stop updating but my audio continues for a few seconds and then the screen rotates and the graphics start updating again.

I was hoping I'd be able to capture a message that tells unity to get ready to rotate so I could completely pause my game, then resume once it's done, but I haven't found such a message. Either that or preferably remove this ridiculous delay/stopped drawing, but from my research it doesn't seem like I have any control over that.

Anyone have any ideas on how to deal with this issue ?

Thanks.

2
NGUI 3 Support / Convert CGAffineTransform to rotate a sprite
« on: March 07, 2014, 04:32:59 PM »
Hi,

I have several XML animations that involve rotating a sprite and the animation is using CGAffineTransform (it's from the iOS source for a port I'm working on), and I can't figure out how to convert those 4 numbers into correct Z rotation for NGUI. I've gotten my sprite to rotate but it's not right (for example; should rotate 360 but kinda rocks back and forth). Any help is greatly appreciated, thanks.

Example of one of the frames:
  1. <array>
  2.     <real>0.366912841796875</real>
  3.     <real>-0.929046630859375</real>
  4.     <real>0.929046630859375</real>
  5.     <real>0.366912841796875</real>
  6. </array>
  7.  

and my reading code:
  1. List<object> transformMatrix = (List<object>)frameAction["setTransform"];
  2.                                        
  3. float a = (float)(double)transformMatrix[0];
  4. float b = (float)(double)transformMatrix[1];
  5. float c = (float)(double)transformMatrix[2];
  6. float d = (float)(double)transformMatrix[3];
  7.  
  8. item.cachedTransform.rotation = new Quaternion(); // What goes here ?
  9.  

3
NGUI 3 Support / Using Physics2D with FixedSize UI help
« on: January 03, 2014, 04:10:54 PM »
Hi,

I am making a ball drop game and using NGUI for everything. I know NGUI is for UI not full games, but the game is simple enough (aside from the physics) that just using NGUI made sense (and I've used NGUI for full game sin the past and it's worked great).

Since the UIRoot is scaled to be very tiny (I assume this is the main issue) the ball (UISprite with a rigidbody) drops and bounces very quickly, changing friction and bounciness makes either little or huge difference, I cannot get it to move the way I need to. I've been trying everything for days now to get it to drop properly and I'm out of ideas. I need to get this working ASAP, and I don't know what to do anymore.

Anyone able to provide any help ?

Is there some combination of UIRoot and Camera settings that will provide better results ?

4
NGUI 3 Support / New anchoring system and prefabs
« on: December 11, 2013, 03:53:28 PM »
Hi,

I have a background sprite that i want to be stretched to fill the screen and I can't't seem to get it to function properly from a prefab (if in the editor it will adjust to the proper size after hitting ctrl+s twice)

Game Resolution : 800 x 480
UIRoot : Fixed Size - 720
Hierarchy:
UIRoot
-Camera
--Levels Container
---Level (Clone) (UIPanel, no anchoring)
----Background Sprite (UISprite, Unified Anchor (0,0,0,0) Target: Level (Clone))

Background Original Dimensions : 1024 x 576
Background In Game Dimensions : 800 x 480 (whatever the game resolution is)

I'm using Screen.width * UIRoot.GetPixelSizeAdjustment to calculate where to instantiate my level so it can slide in and that reports the correct dimensions (in this case 1080 x 720).

Included in the level prefab are a few sprites with colliders and auto-adjust collider set, the colliders get made very tiny when the prefab is instantiated, if I click off and on the auto-adjust checkbox it sets it to the right size.

I assume these issues are related.

Also I have a few elements that are anchored but also need to be dragged around, I used to just tell the UIAnchor to run once and that worked fine, now that option is not available (or at least I can't find the equivalent).

How do I go about these issues ?
Thanks.

5
Hi,

I have been scrolling a UITexture by modifying the UV Rect of the texture and it works great. I just updated to Unity 4.3 and everything is working fine, except this. In the editor it scrolls and repeats fine, however it doesn't repeat on iOS. Why would this stop working ?

Thanks.

6
Hi,

I have many label's that have mis-aligned text when running the game in the Editor and Device's. It shows up fine in the Scene view but no where else.

All my labels are pixel perfect so it's not a scaling issue and they are all at non decimal point locations (eg. x0 y100 z0 as opposed to x0 y100.5 z0, I was told that a similar issue happens in flash when text fields are using decimal values)

I have no idea why this is happening, anyone have any ideas ?

Pages: [1]