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

Pages: [1] 2
1
NGUI 3 Support / Re: Sprite pixel size
« on: December 24, 2014, 08:15:04 AM »
Sorry about post reporting.., I duplicated thread somehow.

About topic, yes I realized that before, but problem was it was all 'funky'. But I fixed it somehow.., thanks for advice!

2
NGUI 3 Support / Sprite pixel size
« on: December 23, 2014, 12:08:12 PM »
Hello!

I have one sliced sprite that I use it in main menu and ingame. Main menu is 3D and I need pixels to be bigger than ingame - yet sprite is same.

Is it possible to use same sprite from atlas -> to make two virtual sprites, one with different pixelsize than other?

Thanks mates!

3
NGUI 3 Support / UI Root, is it needed?
« on: August 22, 2014, 09:19:32 AM »
I have it disabled right now but can I remove it? I mean it is quite annoying to have it because my 3D UI resizes.. and that is no good when I have 3D UI combined with the world (single camera for both!)

4
NGUI 3 Support / Re: 3D anchoring in NGUI
« on: August 22, 2014, 04:58:02 AM »
Does anyone know how to disable automatic scaling of nGUI in 3D mode?

5
NGUI 3 Support / Re: 3D anchoring in NGUI
« on: August 22, 2014, 04:52:35 AM »
Nope, the whole system doesn't scale properly. It works excellent when changing widths but when changing height, it just doesn't scale properly..

6
NGUI 3 Support / Re: 3D anchoring in NGUI
« on: August 22, 2014, 02:54:53 AM »
I DID IT!!  ;D ;D :D :o

I did a simple "hack" / "trick".. here it is for future in-case anyone wants to make rad 3D UI



And the code for UIFakePanel

  1. using UnityEngine;
  2.  
  3. [ExecuteInEditMode]
  4. public class UIFakePanel : UIWidget {
  5.  
  6.     public UIPanel parentPanel;
  7.  
  8.     private int prevWidth;
  9.     private int prevHeight;
  10.  
  11.  
  12.     void FindPanel() {
  13.  
  14.         parentPanel = transform.parent.GetComponent<UIPanel>();
  15.  
  16.         if (parentPanel == null) {
  17.  
  18.             Debug.LogError("Please put Fake panel just above real Panel");
  19.         }
  20.     }
  21.  
  22.     void Awake() {
  23.  
  24.         parentPanel = transform.parent.GetComponent<UIPanel>();
  25.  
  26.         if (parentPanel == null) {
  27.            
  28.             Debug.LogError("Please put Fake panel juset above real Panel");
  29.         }
  30.     }
  31.  
  32.         void Update () {
  33.  
  34.         if(parentPanel == null)
  35.             FindPanel();
  36.  
  37.             if (prevWidth != (int) parentPanel.width || prevHeight != (int) parentPanel.height) {
  38.  
  39.                 SetDimensions((int) parentPanel.width, (int) parentPanel.height);
  40.  
  41.                  prevWidth = (int) parentPanel.width;
  42.                 prevHeight = (int) parentPanel.height;
  43.             }
  44.         }
  45. }
  46.  

7
NGUI 3 Support / Re: Invisible UIButton that can still be clicked
« on: August 21, 2014, 12:18:26 PM »
Oh correct, I forgot alpha is from 0 - 1.. I am used to 0 - 255

8
NGUI 3 Support / Re: 3D anchoring in NGUI
« on: August 21, 2014, 10:12:08 AM »
Ok I see I can anchor widgets inside another widgets just fine like in 2D, but main problem is still here.. everytime I anchor widget to the panel, it just gets f*ck up (basically, it is useless).

I really want this anchoring, old anchoring system works nice but it lacks features (responsive layout).

9
NGUI 3 Support / Re: Invisible UIButton that can still be clicked
« on: August 21, 2014, 08:45:22 AM »
Set alpha to 1, it won't be visible but it will work :)

10
NGUI 3 Support / 3D anchoring in NGUI
« on: August 21, 2014, 08:44:35 AM »
Hello, little question. Old Anchoring system works but I can't use advanced functions like in new Anchoring system. Problem is, new anchoring system in no way works with 3D, as it still acts like it is 2D...

Did I miss something?

Thanks!

11
NGUI 3 Support / Re: Why I can't move UIPanel?
« on: August 21, 2014, 05:49:28 AM »
Well old UIAnchor works nicely I mean it obeys the 3D transformations, I think I will use that :)

12
NGUI 3 Support / Re: Why I can't move UIPanel?
« on: August 21, 2014, 04:09:00 AM »
Yes! You have guessed it half right :).

Thanks! I have the gizmo for moving working now, it works cool.. with one problem. When I set the anchoring on widget, it only moves in Z direction with parent and acts like 2D sprite.. it stays frozen in X or Y axis (does not correspond to the parent/uiPanel movement).  ???

About your offer for update:
No need to disable it default for 3D UI, I will survive  :-*

13
NGUI 3 Support / Why I can't move UIPanel?
« on: August 20, 2014, 05:07:26 AM »
Hello, I want to make 3D GUI and wish to move UIPanel .. problem is this -> even if I move it in Transform, it always stays in same position (gizmo lines don't move)?

I want to make GUI similar to https://www.youtube.com/watch?v=PPGsGYahjd0 where camera goes from UI to UI (panel to panel). But it is annoying editing UI if I can't move panel (I can't see where I can put buttons / where the limits are + editing anchor is very annoying)

Any ideas?

14
NGUI 3 Support / Re: Hover+pressed like event for control buttons
« on: July 24, 2014, 09:45:28 AM »
Ok thanks, will do! Should have red documentation more stronger..

"Self-slap"

15
NGUI 3 Support / Re: Hover+pressed like event for control buttons
« on: July 23, 2014, 05:06:55 AM »
Ok, solved 100%  ;)

I added background sprite which is 1px big (width and height) and has alpha of 1! (if alpha is 0, it is disabled).

Pages: [1] 2