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

Pages: 1 [2]
16
NGUI 3 Support / Odd drag panel behavior when tweening parent object.
« on: February 11, 2014, 03:38:37 PM »
Hello, I have a control structured like so:


MySettingsObject
    ScrollView
       Grid
          Item0
          Item1
          Item2
          etc

Item's are as follows:
ItemObject (with box collider)
    Sprite
    TextLabel

I am tweening "MySettingsObject" into the scene to slide in the panel.  When I do this, sometimes the Items are offset and not in their correct positions.(About 50 pixels off in the x direction).  Now here is the really odd part.  Neither of them have x values that are 50 pixels off(the inspector shows 0), and if i turn the object off/on again in the inspector it will draw them in the correct place. If i look at the Item's base object, its box collider is in the correct place, but it looks like the meshes for the sprite, and text are not being updated when moved until i disable/enable the game object.

Do you have any ideas?



17
NGUI 3 Support / Tweens sharing events?
« on: February 03, 2014, 12:32:41 PM »
Hello, I am currently doing two seperate animations for an open/close ui event, and I noticed that it seems events from previous tweens are being called even though I am doing a new Tween.Begin().

Note: Both tweens are not running at the same time, but are attached to the same root game object.

First Tween:
TweenPosition tween = TweenPosition.Begin(this.gameObject, 0.30f, new Vector3(0.0f, 615.0f, this.transform.localPosition.z));
EventDelegate.Add(tween.onFinished, HideTweenFinished);

Second Event:
TweenPosition tween = TweenPosition.Begin(this.gameObject, 0.30f, new Vector3(0.0f, 0.0f, this.transform.localPosition.z));
EventDelegate.Add(tween.onFinished, ShowTweenFinished);

After calling the first tween, the second tween will call both ShowTweenFinished, and HideTweenFinished when I would expect it to only call the event passed to it.  I am able to remedy the problem by calling Clear() on the event list for the specific tween, but this seems like a bug to me.

Thank you,
Dylan

18
NGUI 3 Support / Is an Incremental NGUI update possible?
« on: November 18, 2013, 02:46:14 PM »
Hello,
For our application we were relying heavily on NGUI for our 2d elements.  Our application consists of many mulitlayered UIs with various animation aspects to each one which will make updating from 2.7 to 3.x take quite a while per scene.  I was wondering if there was a way we could run both versions side by side and update to the new version on a per scene basis? 

Off the top of my head I would think that renaming all of the 2.7 files to something like UIOLD (UISprite -> UIOLDSprite) would work, but we would need to then update all of the prefabs(we have quite a few).  Is there any way we could automate updating the prefabs?  Or do you have any suggestions about what we could do?

Thank you,
Dylan

19
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: November 13, 2013, 05:40:20 PM »
I would love to see some more layout focused updates, such as the ability to add margins to an element so when it is put inside a container such as a table, it would not directly but up against the previous element, or the ability to order items.  Our application currently does a lot of non typical game UI layouts with NGUI, its more or less creating web layouts that need to have flowing elements.  UITable/UIGrid somewhat supports this, but we end up positioning a lot of items by hand(math!) to get the desired effects.

20
NGUI 3 Support / UITexture or UISprite for runtime images?
« on: October 02, 2013, 10:22:23 AM »
In our application we load a lot of images from a web service and display them at runtime.  We are currently using UISprite which requires them to be packed into atlases, but I was wondering if there would be any large downside to switching to using UITexture since the atlas packing seems to add quite a bit of slowdown on older devices.  Will a UITexture display on all devices even if the source Texture2d is not a power of two? 

21
Hello, I am trying to make my list of items on a drag panel stop/center on an item depending on how fast someone flicked the scroll-able area.

I am wondering if there is a way for me to calculate how far the panel will scroll when someone releases a touch(so i could then modify the momentum to stop on the correct position).  I have been looking at the spring dampen code, but I am rusty on my spring physics and I am unsure on how to calculate this.  Has anyone else come up with a solution they would be willing to share?

Thank you,
Dylan

22
NGUI 3 Support / Re: RegisterSceneUndo obsolete in unity alphas
« on: August 27, 2013, 09:19:01 AM »
I wanted to update my local copy of NGUI so I could use the newest client.  I would revert these changes once the official fix was added. This is throwing a compilation error, not a warning.

23
NGUI 3 Support / RegisterSceneUndo obsolete in unity alphas
« on: August 26, 2013, 10:53:25 AM »
 
Hello, I am getting the error:
`UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Please use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Do you know what the suggested replacement would be? I am not super familiar with the Undo functionality.

24
NGUI 3 Support / Best Container for UIAnchor
« on: June 27, 2013, 04:08:11 PM »
Hello, I was wondering what the suggestion would be for the best container for a UIAnchor in the following scenario.

We are creating full screen layouts which we want to tween in/out of the scene.  These layouts include controls that will anchor to the various edges of the layout based on the screen size. (We are instantiating layouts for the current screen resolution off the screen)  If we use the camera as the bounds, we can't instantiate the items off screen and fly them in.  The UIPanel requires clipping, which I don't believe we require in this instance, and we don't want to display any widgets as the container.

I have updated the UIAnchor script to allow you to anchor items "relative to the parent" which will anchor items as if they were in the bounds of the screen, but are movable as a whole from the parent object. This works, but I would like to stick to what the library intended.

What would be the suggested approach to accomplish this?  Create a UISprite that is the same size as the screen and use it as the bounding rectangle?

Edit: I am thinking of using a simple UIScreenSize class which inherits from UIWidget and has an OnStart() like the following:

  1.         void Start()
  2.         {
  3.                 if (uiCamera == null)
  4.                 {
  5.                         uiCamera = NGUITools.FindCameraForLayer(gameObject.layer);
  6.                 }
  7.                
  8.                 Rect pixelRect = uiCamera.pixelRect;
  9.                
  10.                 this.gameObject.transform.localScale = new UnityEngine.Vector3(pixelRect.width, pixelRect.height, 0.0f);
  11.         }


Thank you,
Dylan

25
NGUI 3 Support / Re: Dynamic font randomly don't show properly
« on: June 07, 2013, 08:54:14 AM »
I am having the same problem.  ArenMook, Is a suggested fix to this renaming the TTF file for each font size?   

Currently we are using a single TTF, but have 4 dynamic font prefabs for the different font sizes we use. Are we using this correctly?

Thank you,
Dylan

26
NGUI 3 Support / Re: NGUI and Unity3D 4.2 Metro App + WACK
« on: May 02, 2013, 08:49:22 AM »
UNITY_METRO will work

27
Thank you for the reply Unisip,

I am basically following the suggestions you have given in my current project.  My current problem I am having is where I have two main ui layouts:

Normal UI using multiple atlases, text atlas, main graphics atlas
Popup UI using multiple atlases, text atlas, popup graphics atlas

The text atlas is shared since it is the same font used on both layouts.

I have each layout attached to two different panels under the UI root.  I wrote a popup framework that adds popups on panels that are z ordered so the popup is quite a ways away from the main layer.  My current popup is not showing its text, and I am assuming it is because of the limited number of draw calls.

Do you have any idea on what function i would look into to try to selectively turn off the draw call reduction?  I am not super familiar with how you can batch draw calls in unity, and I am having trouble tracking down the NGUI code.


Thank you,
Dylan

28
Hello, We are using NGUI for making a UI that has multiple layers and are running into problems with the way it renders items.  Currently we have a scene that uses multiple atlases for the elements, and displays text on multiple layers(think popups over the main ui).  On the popup, Some text will not render. I have changed the z order as well as the actual z value.    I am assuming that these items are being rendered in one pass and hidden underneath the other items attached to another atlas.  Is there a way I can turn off the atlas draw batching?  I am not super concerned with the number of draw calls at this point as we are not doing anything that would tax the graphics processor.  I do not want to add the fonts to every layer's atlas as this would take up a ton of additional memory.

Thank you,
Dylan

29
I have tracked the problem down to Input.inputString always being blank in the OSX web player. I am looking into a workaround now and will share my results if I am able to find one.

30
Hello,
I have been using NGUI pro with my current project and found out that the input widget does not seem to be working correctly in OSX. This can be reproduced by deploying the "Tutorial 9" scene to the OSx web player(it works correctly in the editor).  I have also tested this on the windows web player and it works as expected.   I have done a couple of tests, and the unity web player(in OSx) is receiving the key presses, but is not displaying anything.

Has anyone else run into this, or know a solution? 

I plan on digging into the code to pinpoint the issue, but I wanted to see if anyone else knew how to fix this.

Thank you,
Dylan

Pages: 1 [2]