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

Pages: 1 2 3 [4]
NGUI 3 Support / strange issue with high resolution devices!
« on: January 05, 2013, 06:15:55 AM »
i have complaints from people using high resolution devices that the gui is cut off.
devices are new nexus 10 and new asus tablet both over 1920x1600.

the stuff on the right side is cutoff. it uses anchor right.
the stuff on the left is fine, it uses anchor top left.

it works very well on devices from 800,1000 and 1280 widths. how to adress this issue?
thank you very much!

NGUI 3 Support / NGUI troubles with older devices, help me resolve!
« on: December 19, 2012, 05:10:57 PM »
Hi! I used NGUI in one of my projects, it seems that it does not work good on older devices or I dont know how to use it properly
i suspect on three draggable panels that have softclipping on them. I dont know the right combination of shaders and tricks to get it right on, for example older samsung galaxy s2 type of device.

the things i know i can optimize:
1.) disable nguis that are off the screen (it reports less draw calls when they are not visible, but it seems that fps drops when they are disabled), i am not sure how to disable ngui elements and game objects with NGUITools.SetActive(GO,false/true)
because when it is disabled then i cannot find it with name again and i have to maintain reference to it.
2.) try to rearrange things so that i dont get too much overdraws (if i understood correctly no overlapping, or it should be avoided, stacking sprites on top of them, but this is something that i cannot avoid since there must be background to draw onto). One question about this, since i need background for draggable panels with collider to work, can those backgrounds have alpha set to zero so they are not visible but not count for a performance drop?
3.) use only one atlas for everything

things i am not certain about
1.) what shaders for clippedpanel i should use if i want to use it on mobile devices (older, but not that old)?
what else i should take into account, how many elements on the draggable panel, sprites, etc...
2.) what else i should take into account to make ngui fast enough for older devices.

i have to say that ngui is very good gui system but i do not have enough experience to make it work efficiently, i would appreciate your help!

thank you!

one more things to say, when profiling i see UIPanel.LateUpdate as more then 40%, is this a problem?

NGUI 3 Support / is it possible to use mouse scroll to move slider
« on: November 12, 2012, 05:37:55 PM »
like we use mouse scroll over dragable panels?

NGUI 3 Support / vectical scroll bar position
« on: November 12, 2012, 05:04:26 AM »
Hi! I was searching through the forum but i could not find the answer to something i think it should be easy enough to do.
i have everything working with vertical scrollbars but i dont know how to position them from the top to the bottom of the screen.
i do not know what height of screen would be.
Vertical scrollbars are under anchor set to right as it need to be because drag panel is under this anchor too.

Thanks! any help is greatly appreciated!

I am exporting sucessfully fonts from bmfont in unity and using them with ngui, but i want to add shadows directly to the font in photoshop. tga that i am getting is black or white, when used some presets to get alpha or image is flattend and there are not layers for font and background...everything is in the same layer so i can not make use of the drop shadow effect.

what are the correct export settings for bmfont to get targa where font and background are in the separate layers.
how this could be done? thanks!

NGUI 3 Support / Getting the UITooltip to work
« on: October 30, 2012, 05:19:35 AM »
Here is what i did:

1.) Under anchor set up to center created new gameobject with UITooltip on it.
2.) Under that object label and sliced sprite (they are showing just fine in the scene)
3.) I linked label and slicedsprite to UITooltip inspector script fields
Tooltip does not show up when hovered over elements that are buttons for example (i was going trough the tuts and
I saw that elements does not need to have anything extra but colliders.

I am using the latest version of NGUI

I am wondering what else is needed tooltips to work? Something more than i am already doing?

NGUI 3 Support / Chinese is it possible after all?
« on: October 28, 2012, 08:05:21 AM »
I am looking for a solution to display chinese. I went through all the tuts, videos and forum posts that i could find on the topic
and i managed to display some of the chinese characters on the screen. My point is that it's possible but i am having trouble
with the chinese itself and i was wondering have somebody come up with the working solution?

Problem that i am having is to find simplified chinese font with less chars then traditional
i know how to pack a font with four channels and i was wondering is it possible to have more than 2048x2048 on mobile.

currently tga that i get is 16Mb large so that is not working! :)

thanks for help and info if somebody wants to share!

NGUI 3 Support / switching to full screen and maintaining ngui placement
« on: October 13, 2012, 01:34:02 PM »
when i switch to fullscreen some elements are misplaced? especially dragable panels? how to prevent that from happening?

NGUI 3 Support / scrollview inside scrollview?
« on: August 31, 2012, 02:23:31 PM »
is it possible, it would be activated if needed with button or something like that?

NGUI 3 Support / sorting the elements in the grid?
« on: August 31, 2012, 09:57:07 AM »

I am adding children to grid element by code. it seems that they are not sorted in sequence
checking/unchecking "sort" in the UIGrid gives different result but not in the sequence i have this list. i made the list public
so i can see what order elements are in the list. it seems alse that in both ways ("sort" checked or not) it does take into account
game object names that are added to the Grid element (elements beginning with "a" get displayed first...)

can i resolve this somehow, maybe using table instead of grid?

NGUI 3 Support / same height of sprite on various aspect ratios?
« on: August 31, 2012, 05:01:04 AM »

I am making a vertical scrollview and it works fine but when i tried it on the phone it does not go all the way down to the bottom
of the screen. i used top-right anchor so it stays in that position.

I tried to use UIStrech but i dont know where to put it and how to set clipping on the dragPanel based on new height?
Any help appreciated!

NGUI 3 Support / adding child to grid and modifying prefab?
« on: August 30, 2012, 01:15:37 PM »
i have managed to get scrollview, grid and adding children to it to work fine. i have one problem though and that is modifing the child after it was added to the grid. here is the code i have currently (script attached to the button for adding children):

  1. public GameObject Grid;
  2.         public GameObject Prefab; //button with backgroun and label
  4.         void OnClick()
  5.         {
  6.        = Random.Range(0,100).ToString(); // just test to see if i can change the name before it is added to the grid - works!          
  7.                 NGUITools.AddChild(Grid,Prefab).GetComponent<UILabel>().text = Random.Range(0,100).ToString(); //this does not work? i need to modify the label text so that i can get something meaningfull
  8.                 Grid.GetComponent<UIGrid>().repositionNow = true;
  9.         }


everything is working great except this thing. background panel dissapears when i use unlit/transparent soft clip shader.
without it also works but not as smoothly with this shader, but with this shader background dissapears (even when only background panel is made, no other elements)

what to do? i used sliced sprite as background.

NGUI 3 Support / Scrollable panel, working but...
« on: August 29, 2012, 06:15:19 PM »
i used tutorial to make scroll view (clipped panel way) and it works good but every time panel is scrolled all labels are "greyed out" and it takes a seconds or so to come back, like it is being rebuilt. now your example works perfectly and i want to make something like that. do somebody know what could be the problem here? i verified the materials, disabled all button scripts that make button move/scale change color etc... but nothing worked. i guess there is something that i am missing. i wanted to do it this way because i want the scrollview to be in 3d.


NGUI 3 Support / Input OnSubmit event?
« on: August 28, 2012, 02:11:29 PM »
what am i doing seems to be working but i get the error about event -> "The best match for method OnSubmit has some invalid parameter."

here is the code that i attached to Input control

  1. using UnityEngine;
  2. using System.Collections;
  4. public class InputControl : MonoBehaviour {
  6.         public GameObject InputField;
  8.         void OnEnable()
  9.         {
  10.                 UIEventListener.Get(InputField).onSubmit += OnSubmit;  
  11.         }
  13.         void Start()
  14.         {
  15.                 if(PlayerPrefs.HasKey("Player Name"))
  16.                 {
  17.                         InputField.GetComponent<UIInput>().label.text = PlayerPrefs.GetString("Player Name");
  18.                 }
  21.         }
  23.         void OnSubmit(GameObject go)
  24.         {
  25.                 if(PlayerPrefs.HasKey("Player Name"))
  26.                 {
  27.                         PlayerPrefs.SetString("Player Name", go.GetComponent<UIInput>().text);
  28.                         PlayerControl.Name = PlayerPrefs.GetString("Player Name");
  29.                 }
  30.                 else
  31.                 {
  32.                         Debug.Log("No key");   
  33.                 }
  35.                 Debug.Log("Name: " + PlayerPrefs.GetString("Player Name"));
  36.         }
  37. }

Pages: 1 2 3 [4]