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

Pages: [1] 2
1
NGUI 3 Support / Re: Keyboard of Windows Store
« on: June 08, 2014, 09:56:12 AM »
So how can we use the touch keyboard with NGUI? Has it been fixed yet?

2
NGUI 3 Support / Keyboard of Windows Store
« on: May 27, 2014, 09:15:46 AM »
Unity 4.5 includes support for programmatically opening on screen keyboard in Windows Store Apps.
Will we get a NGUI fix that will allow input textboxes to trigger keyboard on Windows Store Apps? :)

3
NGUI 3 Support / Resizing while keeping aspect ratio
« on: April 26, 2014, 05:48:21 PM »
I have a background image that I want to resize to fill the screen while keeping its aspect ratio. The image needs to be centered on the screen, but here is where it gets tricky:
I want the image to always fill the screen completely, screen should have no parts that are not covered by the image.
If I use aspect ratio constrain by width or height while anchoring to sides, I can only achieve it filling the screen in certain resolutions.
I draw a quick picture of how it is supposed to behave, it is in the attachment.

How would I do this in NGUI?

EDIT:
I created two versions of the background, one is restrained by width the other is by height. Then I check the aspect ratio of the screen and activate one of them that would be appropriate for that aspect ratio. That solves the problem.
Does NGUI have an included way to solve this or should I stick to my solution?

4
NGUI 3 Support / Re: [3.5.8] Windows Store Compiler Errors
« on: April 24, 2014, 03:50:59 AM »
Quote
Then you won't run into #2.
Yes, that's one way to fix it.

Quote
IsEnum is also not valid on WSA? That's pretty awful. I don't know why Microsoft decided to ship a different version of .NET that's missing half its features for WP8/WSA. Worse yet, they forced Unity to use their stripped-down .NET library instead of using Mono like on every other non-Windows platform. But that's how it is... Unfortunately when working with a WP8/WSA target platform you are effectively working with a crippled set of tools due to Microsoft.
I agree with everything you said. >:(
I have no idea why they decided to cripple their devices.

So what NGUI features don't work because of the crippled .NET library? Data binding?

5
NGUI 3 Support / [3.5.8] Windows Store Compiler Errors
« on: April 23, 2014, 03:51:49 PM »
1. Error
http://www.tasharen.com/forum/index.php?topic=9217.0

2. After fixing the first error, have to fix classes using that method, more specifically, PropertyBinding OnValidate method. Have to surround it with #if REFLECTION_SUPPORT as well

3. DataNode in ConvertValue method, type.IsEnum doesn't exist in Windows Store applications.

Also, I want to know, are there any NGUI features that I can't use on Windows Phone 8 and in Windows Store Apps? Besides, some methods for convenience? Cause after these errors and using REFLECTION_SUPPORT I am worried about going further along the project only to find out some things aren't supported on Windows Store and Windows Phone 8.

6
NGUI 3 Support / Re: Moving objects outside UIRoot breaks anchoring
« on: April 02, 2014, 07:05:02 PM »
Thank you for the suggestion.
I'll try doing that and see if I run into any additional problems.
Thank you for the help.

7
NGUI 3 Support / Re: Moving objects outside UIRoot breaks anchoring
« on: April 02, 2014, 06:37:32 PM »
Thank you for your support.

Quote
Panels should never be on the same object as widgets. It never worked. Your widgets were actually using UIRoot's panel, I'm guessing.
Could be, or the only widgets that were on the same objects were layout related ones such as grids.

Quote
"Anchoring a game object" -- I already mentioned that you should not anchor anything when you're simply parenting something underneath another object. Anchoring will never work outside of UIRoot anyway.
I see. So the only solutions I have is either to instantiate the widget under the UIRoot at runtime or write a custom script that would move it into the ui camera's view when needed?

8
NGUI 3 Support / Re: Moving objects outside UIRoot breaks anchoring
« on: April 02, 2014, 06:26:39 PM »
Ah, so putting a UIPanel on the same object the widget is on doesn't work anymore (it used to work in previous versions).
Alright, when I put it as a child of UIPanel it works. But anchoring to a game object still doesn't. It goes off screen and its dimensions change to 2 x 2.
What else am I missing?

9
NGUI 3 Support / Re: Moving objects outside UIRoot breaks anchoring
« on: April 02, 2014, 06:07:19 PM »
I am "drag and dropping" the widget in the editor not via code.
How would I even call that function in the editor? :s Write a custom menu item that would refresh currently selected widget? Or do you already have something similar?

10
NGUI 3 Support / Re: Moving objects outside UIRoot breaks anchoring
« on: April 02, 2014, 05:26:15 PM »
It doesn't.
And like I mentioned, it only happens if I move the widget out of UIRoot and parent it to a game object.
Trying to move the widget in the sceneview results in gizmos snapping back to the place where they were supposed to be. However, I can't move the widget at all.
When I try moving it by changing the transform directly, it again becomes "out of sync" and the image of the widget moves in large discrete intervals while gizmos move normally.

11
NGUI 3 Support / Re: Comparision of NGUI over new uGUI
« on: April 02, 2014, 04:51:59 PM »
UT do take their sweet time letting us have bug fixes. :(
For how long have we been waiting for them to fix 2d physic events getting called twice? In fact, how could they have even released it with such an obvious bug? It would take less than one day of one developer to implement a quick temporary solution until the problem is resolved in its root. But no, few months later and still no fix.

We all like to idealise and think the newest thing is so much better than the old thing - before we try it. And then, we all come back to NGUI, because all the little problems and annoyances that it has are still better in comparison to huge ones of other systems.
When I heard about uGUI I was ecstatic and couldn't wait for it to be released. But in the last year, UT has disappointed me in many ways and I don't have too high hopes for it being usable as soon as it is released.
Hopefully, they will include some source code they promised so we can fix things ourselves.

12
NGUI 3 Support / Re: Moving objects outside UIRoot breaks anchoring
« on: April 02, 2014, 12:41:22 PM »
Bump?

13
NGUI 3 Support / Re: Moving objects outside UIRoot breaks anchoring
« on: April 01, 2014, 11:50:13 AM »
Quote
You don't need more than one UIRoot. What are you trying to do? To display something above the character's head, make it a regular widget, a part of the UI hierarchy, and make it anchored to a 3D object. Why are you trying to make it a part of the game world?

I need to display a 2d widget above an Unity sprite, something similar to a health bar. I need it to be "bundled" together with the game object because not making it that way would cause a lot of in game systems to feel "dirty" and require a lot of additional work to ensure everything from dynamic loading and unloading, instantiating, object painting etc, works.

Quote
"Even if you did make it a part of the game world, you don't need a UIRoot, and you don't need to make it "follow" anything. Simply making it a child of the 3D object will make it "follow" it."
Yes. Transform does "follow" the object but everything else, including the widget appearance, does not. Moving the the widget doesn't seem to move the appearance of the widget until a certain threshold is passed then it snaps to a position 800 px away. All in all a very strange behaviour.

See a screenshot in the attachment to see what I mean.
The widget appears in the scene view in one position but appears in game view in another (or it isn't in the game view at all). Note, the problems occur only if I move the widget outside of UIRoot as a parent of my game object. The widget does not have anchoring enabled.
If I just move it out of UIRoot so it doesn't have a parent it looks and behaves as it should. However, I can't use it like that because of previously mentioned problems.


To sum up what the widget needs to do:
  • be a child/sibling of a game object that exists outside the UIRoot
  • "follow" its target in x and y axis like a hud health bar

I don't need a bunch of advanced stuff and polish. I need just those two things.
Is it doable? How?

14
NGUI 3 Support / Re: Moving objects outside UIRoot breaks anchoring
« on: April 01, 2014, 08:47:53 AM »
I remember being able to have widgets outside UIRoot that are anchored to the parts of the screen. That doesn't exist anymore?

I want the widget to display above the object and it would be convenient if the widget could be a part of the same prefab as mentioned object, I'd like to avoid instantiating the widget at runtime.

Can I add an additional UIRoot script to the object the widget resides on or his parent? Would that fix it? Would there be any potential problems with multiple UIRoots? Would performance suffer? Anything I need to be careful about?

15
NGUI 3 Support / Moving objects outside UIRoot breaks anchoring
« on: April 01, 2014, 03:40:28 AM »
I would like to have a widget anchored to a game object as a child or a sibling to that game object.
I've set up the widget exactly as I want it to appear on the screen. Currently, it is a child of UIRoot but has its own panel. I anchored it to target game object, so far so good.

However, the problem arises when I try to change its parent. I tried moving it so it has no parent and I tried reparenting it to another game object. Both fail spectacularly.
If I turn off the anchoring and move it so it has no parent, widget stays where I want it, but as soon as I turn the anchoring back on it goes far offscreen.
Of course, not turning the anchoring off before moving makes it go offscreen right away.

When I try to reparent it to another game object even more bizarre things happen. Even when I turn OFF the anchoring and reparent it, it is no longer in the position it is supposed to be in. In the scene view it appears to stay in the same position but in the game view it switches the position about 500px to the center of the screen and trying to move the widget results in it snapping to discrete intervals that seem to be around 800px wide. I assume it is a problem with float precision? Turning On anchoring at this point makes the widget go offscreen and its size to change to 2x2.

What am I doing wrong?

Pages: [1] 2