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

Pages: [1]
1
NGUI 3 Support / nGUI w/ Unity Test Tools
« on: August 10, 2014, 04:51:44 PM »
How do you make this work?
When I create a test and add a nGUI element, the UIRoot appears outside of the test, and I can't seem to move it under the test.

2
NGUI 3 Support / instantiate ngui sprite
« on: August 09, 2014, 05:38:32 PM »
I know it is recommended to use NGUITOOLS.AddChild rather than Instantiate but I'm kind of in a conundrum.

I am trying to make my sprites nGUI Sprites so I can keep my game sprites in one atlas.   I was using Unity Sprite and was instantiating it at top of the screen randomly between left/right of the screen.  When I tried converting to nGUI sprite so I can share the atlas I can't get the behavior to match unity sprites as NGUITOOLS.AddChild requires a gameobject to represent the start position, and I don't want to have tons of game objects at the top of the screen representing many different starting points. 

If I use instantiate it always start at 0,0.
Is there is no way to do this using a nGUI sprite, or do I need to stick with Unity sprites?

Since the game is 2D, I was trying to keep everything under UIRoot and keep them all using nGUI widgets rather than mixing nGUI sprites and unity sprites.

3
NGUI 3 Support / 2D games with ui elements mixed in game
« on: August 06, 2014, 02:30:26 AM »
What is the best practice for building a game that has no clear distinction between UI and Game outside of the menu screens. 

Do you remove the default scene camera and create a UIRoot and put everything under that?
Would you use nGUI to keep your game sprites sized for different aspect ratios?

4
NGUI 3 Support / 4 widgets sharing depth of 1
« on: August 06, 2014, 02:27:44 AM »
I have four sprites in the scene, there is empty game object with nGUI sprite and nGUI Label as separate game objects.  I get a message on the sprite that 4 widgets are sharing the depth of 1.  Same with Labels but complaining about depth 2.

These 4 sprites are prefabs, they are not overlapping so I would expect them to all be instantiated with the same depth.  Should I be changing the depth of each sub object when I instantiate the prefab, even though they are not sitting on top of each other? 

5
NGUI 3 Support / Prefab and UIInput/Label questions
« on: July 29, 2014, 01:07:30 AM »
I have a few issues I'm running into when trying to build a crossword puzzle type of game.

I have an empty game object (Square) which has a gameobject w/  nGUI sprite (uisprite, box collider and UIInput) and another child game object with UILabel).

Screenshot: https://db.tt/s8gUz0Th

Right now I am testing four of these making up a 2x2 grid.  Each square will hold 1 character.

1) How to make the font stay the same size.  I found using Unity font gave me the best results (no gradient, max lines 1).  I tried different settings for overflow and each letter is a different size.  j is big, m are tiny.  Since I am using only 1 character, none of the overflow options really seem to make sense, there is nothing that "do nothing" and leave it be. 

2) Change color of unity font, color tint doesn't work, gradient does if I make top/bottom the same, is that the only way to do it?

3) I made the game objects a prefab, i have the 3 game objects listed above saved as prefab.  But I can't figure out how to do certain things.  Like for example when I change the "overflow" type, and click apply it doesn't seem to affect the other 3 prefabs brought into the scene. 

4) Also with the prefab, I am trying to set submit/change for the UIInput, when I drag the parent game object (that has my script) into submit/change and select my funtions and hit apply to save the prefab, is the game object stored in notify the one I dragged there (thus the same for all four prefab instances) or does it know to use the one for that prefab instance?  The prefab is Square (Parent) Sprite (Child) Label (Child) and the script is on Square (Parent) which would be dragged into Notify on the Sprite UIInput.  I want to make sure it uses the correct Square (Parent) for the prefab's instance.  It appears to (i'm setting a public variable in the script and setting it to whatever is in UIInput to make sure they are all unique).  But want to make sure that is the proper way to do it, or do I need to use code and call getComponent to make sure I get the correct parent object for that particular instance.

5) Is there a way to get sharp crisp fonts with nGUI fonts that would be variable size?  It seems like the Unity native ones are much much sharper.

6
NGUI 3 Support / UIInput Question & Unity Remote
« on: July 21, 2014, 11:43:53 PM »
Is there anyway to test UIInput over Unity Remote?  When I tried it, it would allow you to click on the input and would flash the cursor but no way to get a keyboard to enter anything.  (Tried using Android Unity Remote 4).

Is there anyway to use UIInput to enter in a crossword square without the giant input box showing up (and just have a keyboard show up and allow you to enter character inside of a square).

Here is what I am seeing when testing on Android device:
https://www.dropbox.com/s/z7hcujh8f10lkfl/2014-07-22_00-31-53.MP4

This is more what I want to happen, but with the keyboard showing up to enter text.
https://www.dropbox.com/s/ylj1hb501e8mpwi/2014-07-22_00-34-59.MP4


7
I am trying to wrap my head around using nGUI with 2D games.

One scenario that confuses me, is when you have game elements (like player, enemy, obstacle) with UI elements like a health bar or hit numbers.  As far as I understand it, anything that uses nGUI has to fall under UI Root, but a player or enemy for example would be under the main camera.  How would you get the hit numbers/health bars (in my case crossword puzzle squares with label and input) to work with nGUI elements without having some of your game objects under main camera and some in UI Root because they have UI elements.  And how do you handle mobile aspect ratio issues when dealing with these two independant cameras.

It is confusing how to manage some objects under one camera and some under another when there is not a clear separation from UI and Game.

In my case, I have crossword puzzle squares but there are elements that do not have UI components that would be under the main camera but the squares are not really UI they are part of the game but just have UI objects on them.  This gets more confusing when trying to do something like a 2D platformer where you have all sorts of text and ui like elements mixed in with game view elements.

I assume one way is to throw everything under UI Root, is this the recommended way?  What is the best practice to handling objects that are not UI objects, but really game field objects with UI elements attached?

8
I am trying to follow along with the new 3.6 videos and learn how to use nGUI.
I created a new scene and did create sprite, picked a texture atlas and I can see the sprite in game view, but it isn't showing up in scene view.

9
NGUI 3 Support / editable text in crossword puzzle
« on: July 10, 2014, 02:03:06 AM »
I am trying to make a game that is similar to a crossword puzzle.  I have a prefab that contains a sprite for each square, then I am thinking I would have an animation that shows a blinking cursor when a square is clicked (unless nGUI can do this).

What is the best way to handle having an editable text box for each cube (for a single letter).  I would create the cubes on the fly at the start of the puzzle based on the puzzle based on a prefab.   So each one of these would need to have it's own text field that is locked to the middle of the cube.

I'm really new to using nGUI and not sure the best way to set this up.

Thanks!

10
NGUI 3 Support / How will nGUI differ from the new uGUI?
« on: December 15, 2013, 01:11:41 AM »
I am curious how nGUI will differ from the new GUI you worked with Unity on.

Pages: [1]