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

Pages: [1] 2 3 4
1
https://youtu.be/u5afNmQtwkI

So like above video, below's cards does not shown. Until I click with mouse left inside that scrollview area.

How can I make it shown at first without the need of mouse click?

Here is code.
  1. public void MakeBattleHand()
  2.     {       //Make user's hand's card when battle mode
  3.         foreach (CardBase cd in HandCardClass)
  4.         {
  5.             AddCardToBattleHand(cd);
  6.         }
  7.     }
  8.     public void AddCardToBattleHand(CardBase cd)
  9.     {
  10.         GameObject go = Instantiate(cardPref);
  11.         AdvenUI.Instance.MoveObjToNGUITransform(go, handGridBat);
  12.         go.GetComponent<CardPreScript>().thisCard = cd;
  13.         go.name = cd.name;
  14.         MakeCardInfo(go, cd);
  15.         handScrollBat.transform.localPosition = new Vector3(0, 0, 0);
  16.         handScrollBat.UpdateScrollbars(true);
  17.     }
  18. ............
  19. public void MoveObjToNGUITransform(GameObject go,  UIGrid grid)    
  20.     {
  21.         if (go == null)
  22.             return;
  23.         go.transform.parent = grid.transform;
  24.         go.transform.position = CardManager.Instance.Tf_UI_Root.transform.position;
  25.         go.transform.localScale = new Vector3(1f, 1f, 1f);
  26.         go.transform.localRotation = Quaternion.identity;
  27.         grid.Reposition();
  28.         grid.repositionNow = true;
  29.         grid.transform.parent.GetComponent<UIScrollView>().ResetPosition();
  30.         NGUITools.MarkParentAsChanged(go);
  31.         grid.transform.parent.localPosition = new Vector3(0, 0, 0);
  32.         SetCard.Instance.ShowDeckNum();
  33.     }
  34.  
  35.  



2
So my game now has 3 decks, Hand, Discard, Draw decks. And cards in game frequently move between these 3 decks.

What is good code to move one scrollview's contents to another scrollview?

I used this code, but I don't know this is proper and whether having redundant line or not.

And sometimes move many cards in once, some cards are missing and card's transform appear instantly on center of camera and then moved to another, this is also annoying thing.

-------------
  1. public void MoveObjToNGUITransform(GameObject go,  UIGrid grid)    
  2.     {
  3.         if (go == null)
  4.             return;
  5.         go.transform.parent = grid.transform;
  6.         //go.transform.position = CardManager.Instance.Tf_UI_Root.transform.position;
  7.         go.transform.localScale = new Vector3(1f, 1f, 1f);
  8.         go.transform.rotation = Quaternion.identity;
  9.         grid.Reposition();
  10.         grid.repositionNow = true;
  11.         grid.transform.parent.GetComponent<UIScrollView>().ResetPosition();
  12.         NGUITools.MarkParentAsChanged(go);
  13.         SetCard.Instance.ShowDeckNum();
  14.     }
  15.  

3
NGUI 3 Support / Too many vertices?
« on: May 10, 2017, 05:22:04 AM »
I got this error when I play unity and some of my game's land's blue hex icon increased.

I think this happen when blue hex icon's coverage area become over camera's range.

Why and how to fix this error?

4
So I have 3d map in my game scene and 3d objects on that map.

I using tooltip trigger that trigger description ugui window if I mouse over to that 3d object's collider.

Problem is, when I open NGUI UI, when I mouse over to 3d world's object, tooltip triggered Even when NGUI UI element block it so it does not shown.

How can I block input to that ugui tooltip when NGUI UI shown over it?

Thanks.

5
NGUI 3 Support / How to show image's sliced properly?
« on: March 11, 2017, 08:38:17 AM »
Compare these 2 pictures.
At unity gui's Image, just register image is easy and shows with no problem.

But why ngui does now show image's sliced? And why it need to make atlas? So unconvenient.
 

6
NGUI 3 Support / Drag and Drop problem
« on: February 28, 2017, 06:34:55 AM »
Hi.
As you can see in this video,

https://youtu.be/BYOUw-_xhlQ


1.
When I register card from below panel to above panel, (both ngui include card images)
Card image's upper and below part disaapears and can't be seen.
How to fix this?

2.
And when I click card and drag, it should be shown above all GUI, but it does not show and when I release, it reappear and come back to below or above panel.
How to show it when I dragging?

Thanks.

7
NGUI 3 Support / nGUI drag & drop problem after update
« on: January 23, 2017, 11:30:25 PM »
Hi.
I used ngui and skip 1~2 years and recently come back.

So I am using NGUI newest version downloaded from asset store, but here version text says 3.9.2 is this normal? (asset store says 3.11.)

(see attachment image)


And I am using ngui drag&drop feature for set unit position.

At past, everything works, but after update ngui, I met this problem,

as you can see at this video,    https://youtu.be/_drL1OWoJ7Q

Dragging portrait should be 2D UI space and should not move to Z position.

But it moves like 3d and does not move vertically.

How to fix?



8
NGUI 3 Support / How merge different scene's NGUI objects? 2 UIRoot?
« on: August 26, 2015, 09:36:58 AM »
So I have 2 unity projects, need to merge them.


1. Both have NGUI objects, how can I merge and integrate?

2. And what happen if I have 2 UIRoot in one scene?

Thanks.

9
NGUI 3 Support / Localization system asian language doesn't suppoted.
« on: August 23, 2015, 02:39:25 AM »
I followed as-is from this site's localization system documentation,

but does not recognize Korean characters and Japanese characters.

I write korean, japanese texts at .csv file, but when see it on inspector with UILocalize script attached, just shows nothing or [?] mark.




10
NGUI 3 Support / Why Tween series always disabled from the start?
« on: June 23, 2015, 01:53:15 AM »
I want to add fadeout, in effect to the Unity new UI Text object.

So I attached TweenAlpha to that text object,

but when I play game, TweenAlpha just disabled and never get enabled even if I manually enabling it by script.

Why and how can I achieve my effect?


11
NGUI 3 Support / Are there example of UITable?
« on: March 22, 2015, 09:02:28 PM »
So you updated newly UITable?

Are there example of usage it?

If not, what is it for?



12
NGUI 3 Support / mTouchID = int.MinValue; occur error at unity5.0
« on: March 17, 2015, 12:42:37 AM »
So I have project that has NGUI and no problem at all at unity 4.6.1

I made backup and upgraded to unity 5.0, After upgrade, 20 errors occurs, I imported ngui 3.8 at asset store just before, most error disappeard, but one line.

mTouchID = int.MinValue;


Assets/Script/UI/CardDetailScript.cs(7,9): error CS0103: The name `mTouchID' does not exist in the current context

13
NGUI 3 Support / How can I use EZGUI with NGUI at the same time?
« on: March 03, 2015, 02:05:11 AM »
After import 2 packages, script error occurs. Seems 2 package both uses UIPanel, UIProgressBar, etc.

How can I revise and use both gui at the same time?

Thanks.

14
NGUI 3 Support / How to drop atlas's file size?
« on: January 28, 2015, 08:35:35 PM »
So I made many atlases by ngui-atlas maker.

Some has many cards (over 20~30), some has many gui element (window, btn, etc).

But its file size incredibly large like over 20mb, 40mb.

So I checked image atlas's inspector and it has 4096, Truecolor setting.

So if I want size-down, (cuz I am making mobile game, file size is also issue) should I have to make atlas texture format as 'Compressed' and lower 'Max Size' option at import setting?

Do I have other optional ways to lower entire .apk file size?

Thanks.

15
NGUI 3 Support / Attach tag to UITextList?
« on: January 27, 2015, 10:48:05 PM »
So I use UITextList for show system message to end users.

How to add some tag to text, and if user want to see only specific type message, how to show only that type message?

Like mmo game(world of warcraft)'s message window, if user click battle message tab, only battle related message will appear.


Pages: [1] 2 3 4