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 - Caio.Lib

Pages: [1] 2
1
NGUI 3 Support / Re: NGUI Virtual Joystick
« on: June 23, 2014, 09:59:10 PM »
I'm using UIJoyStick:
http://www.youtube.com/watch?v=SqJQjgmWO4E
https://gist.github.com/anonymous/6949309

You need to change UpdateRealTimeDelta() to RealTime.deltaTime and it works.
Thanks 白明翰 for the video and the code.

2
NGUI 3 Support / Re: How can i Instantiate a prefab with NGUI ?
« on: June 15, 2014, 03:36:50 PM »
Hi,
You can use: NGUITools.AddChild(GameObject parent, GameObject prefab);

3
NGUI 3 Support / Re: NGUI 3.6.4 - WP8 - UIInput
« on: June 14, 2014, 05:41:38 PM »
As quantumfrog and latas said, the problem remains.
I'm using NGUI 3.6.4 and change event.

5
NGUI 3 Support / Re: Label issue
« on: June 06, 2014, 10:20:51 AM »
yuyaokada, which is version of NGUI are you using?
This code works for me:

  1. gameObject.GetComponent<UILabel>().fontSize = 0;

6
NGUI 3 Support / Re: NGUI 3.6.2 - WP8 - UIInput
« on: June 05, 2014, 01:45:16 PM »
ArenMook thank you for you help,

What I realized is that TouchScreenKeyboard.hideInput in Unity 4.5 on Windows Phone is always True.
I reported the bug: http://fogbugz.unity3d.com/default.asp?612011_ed1ipc886qooun94
I tried some changes but I messed up the code:

UIInput - 583:
  1. #if !UNITY_WP8
  2.         if (TouchScreenKeyboard.hideInput)
  3. #else
  4.         if (keyboardType == KeyboardType.HiddenInput)
  5. #endif
  6.  

I replaced all others but it stopped working.  :-[
I'll wait for the fix from Unity, the animation is having issues on Windows Phone too.

Thank you


7
NGUI 3 Support / Re: NGUI 3.6.2 - WP8 - UIInput
« on: June 04, 2014, 02:46:01 PM »
I noticed another issue, when changing Validation to None I can type and the letters appears but like '|' and I can't remove them.

*I'm using Unity 4.5.0f6

Thank you

8
NGUI 3 Support / Re: NGUI 3.6.2 - WP8 - UIInput
« on: June 04, 2014, 10:30:52 AM »
I'm using Keyboard Type: default.
I just tested it on Android, Unity's Editor and WP8. Only WP8 has the issue.

Thank you

9
NGUI 3 Support / NGUI 3.6.4 - WP8 - UIInput
« on: June 03, 2014, 09:27:28 AM »
Hi!

I'm having problem with UIInput in WP8 after updating NGUI.
UIInput OnChange is firing but UIInput.current.value is empty and when I type, nothing shows in the UIInput's label property.
It's working fine in Editor and was working fine before.

BTW: I updated NGUI. The Read Me name is ReadMe - 3.6.2 but in Editor's Help it shows NGUI Documentation (v.3.6.1) is that right?

Thank you!

10
NGUI 3 Support / Re: NullReferenceException with GetComponent
« on: June 03, 2014, 09:14:10 AM »
Hi,

When you click on the message in the console is the same GameObject?
Are you using more than one script for this GameObject?

I think the error comes from another script.




11
NGUI 3 Support / Re: Many different issues with ScrollView
« on: April 06, 2014, 11:36:12 AM »
Hi, I had some of these problems too, what i did:

Scroll view's hierarchy:
- Scroll View ( UIScroll View )
-- Scroll Container ( Box Collider, UITable in my case, UIDrag Scroll View )
--- 01 Items
--- 02 Items

- The list gets created with a big empty space on top, but if I click on the scrollbar, the list fits correctly. UIGrid Pivot is already set to TopLeft.
I changed UIScroll View's Content Origin to another value, then returned to TopLeft and fixed the problem.

- I selected Alphabetical sorting, but the items are placed kinda randomly. In the scene Hierarchy, instead, they are sorted correctly.
I'm using scene hierarchy sorting too.

- All the items seem to have an offset of 1 pixel to the right.
- I can't find a way to have hard clipping, there is always at least 1 pixel of alpha clipping.

I don't know, in my case UITable has an Advanced Anchor for Scroll View only for Left and Right.
The items have Anchors Unified for Scroll Container.

- The scrollwheel isn't scrolling the list.
Use UIDrag Scroll View.

Hope it help!

12
NGUI 3 Support / Re: Unity's Sprite between NGUI layers
« on: March 28, 2014, 07:59:22 AM »
You're right!! It's working now!
I didn't realize it, I'm using only one camera now and it's working even without SetRenderQueue I'm just changing Z.
Thank you very much ArenMook!!

13
NGUI 3 Support / Re: Unity's Sprite between NGUI layers
« on: March 27, 2014, 09:29:03 PM »
Thank you ArenMook,
I tried to use SetRenderQueue but didn't work. Now I'm using another camera for HUD.
I may be doing something wrong, I tried to change SetRenderQueue to get children and see changes in Unity Editor but it seems that my code didn't work:

  1.    
  2.     [ExecuteInEditMode]
  3.     public class SetRenderQueue : MonoBehaviour
  4.     {
  5.         public int RenderQueue = 3000;
  6.  
  7.         private List<Material> m_MaterialList = null;
  8.  
  9.  
  10.         private void Awake()
  11.         {
  12.             m_MaterialList = new List<Material>();
  13.         }
  14.  
  15.  
  16.         private void Start()
  17.         {
  18.             LoadMaterial();
  19.             LoadChildrenMaterial();
  20.         }
  21.  
  22.  
  23. #if !UNITY_EDITOR
  24.  
  25.  
  26.         private void OnDestroy()
  27.         {
  28.             if (m_MaterialList.Count > 0)
  29.             {
  30.                 for (int i = (m_MaterialList.Count - 1); i >= 0; i--)
  31.                 {
  32.                     Destroy(m_MaterialList[i]);
  33.                 }
  34.             }
  35.         }
  36.  
  37.  
  38. #endif
  39.  
  40.  
  41.         private void LoadMaterial()
  42.         {
  43.             var render = renderer;
  44.  
  45.             if (render == null)
  46.             {
  47.                 var particleSystem = GetComponent<ParticleSystem>();
  48.  
  49.                 if (particleSystem != null)
  50.                 {
  51.                     render = particleSystem.renderer;
  52.                 }
  53.             }
  54.  
  55.             if (render != null)
  56.             {
  57.                 var material = new Material(render.sharedMaterial);
  58.                 material.renderQueue = RenderQueue;
  59.                 render.material = material;
  60.  
  61.                 m_MaterialList.Add(material);
  62.             }
  63.         }
  64.  
  65.  
  66.         private void LoadChildrenMaterial()
  67.         {
  68.             var render = renderer;
  69.  
  70.             foreach (var child in gameObject.GetComponentsInChildren<Transform>())
  71.             {
  72.                 render = child.renderer;
  73.  
  74.                 if (render == null)
  75.                 {
  76.                     var particleSystem = child.GetComponent<ParticleSystem>();
  77.  
  78.                     if (particleSystem != null)
  79.                     {
  80.                         render = particleSystem.renderer;
  81.                     }
  82.                 }
  83.  
  84.                 if (render != null)
  85.                 {
  86.                     var material = new Material(render.sharedMaterial);
  87.                     material.renderQueue = RenderQueue;
  88.                     render.material = material;
  89.  
  90.                     m_MaterialList.Add(material);
  91.                 }
  92.             }
  93.         }
  94.     }

I'll keep it simple! Thank you very much!

14
NGUI 3 Support / Re: Unity's Sprite between NGUI layers
« on: March 26, 2014, 05:57:47 PM »
Almost there!
I think NGUI's part is OK now, i did what you said: All UIPanels Render Queue are set to "Explicit" : 3000.

- UIPanel Background [ Z:0 ]
- UIPanel HUD [ Z:-3 ]

But how can I see Unity's Sprites between these panels?
I have several Unity's Sprites at Z:-1 but i can't see them.
What I wanted to said is how can I use Z globally between NGUI and Non-NGUI objects, I'm sorry for the mess!
Thank you very much for your help!!


15
NGUI 3 Support / Re: Unity's Sprite between NGUI layers
« on: March 24, 2014, 08:37:25 PM »
Thank you for your explanation ArenMook, but I still could not solve this!
I changed:

NGUI ( UIRoot - UIPanel [ Render Q: Automatic ] - Z:0 )
- HUD Camera ( Depth Only - Depth: 1 - Size:1 - Layer:HUD )
- Background Panel ( UIPanel [ Render Q: Start At:0 ] - Z:0 )
-- Background ( UISprite - Z:0 )
- HUD Panel ( UIPanel [ Render Q: Start At:1 ] - Z:-3 )

My questions:
- Which is the Unity's render queue value?
- What is the difference between Render Q Explicit and Start At.

I was using Explicit because of what i read, but I actually don't know what to use!
Thank you!

Pages: [1] 2