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

Pages: [1]
1
Hi,

I never had this error before with 2.3.x versions, but with 2.5.0 i get this error when i want update NGUI in my project:

Assets/NGUI/Scripts/Editor/UIWidgetInspector.cs(528,55): error CS0117: `Tools' does not contain a definition for `current'

Is it Unity or NGUI problem?

2
NGUI 3 Support / Sprite preview in 2.22 - bug
« on: October 06, 2012, 01:01:20 PM »
From NGUI 2.22:

FIX: Sprite preview should now display wide sprites correctly.

but looks like doesn't works :(

3
NGUI 3 Support / OnEnable/OnDisable
« on: September 16, 2012, 01:22:07 PM »
I have assigned script to a few game objects with UI childs this script for visibility controll when GUI items are showed:

  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class VisibleByCheckbox : MonoBehaviour
  5. {
  6.        
  7.         public UICheckbox cb;
  8.        
  9.         void OnEnable()
  10.         {              
  11.                 NGUITools.SetActive(this.gameObject,cb.isChecked);                                             
  12.         }
  13.        
  14.        
  15.         void OnDisable()
  16.         {
  17.                 NGUITools.SetActive(this.gameObject,cb.isChecked);                             
  18.         }
  19.        
  20. }
  21.  
  22.  

but NGUITools.SetActive command enable only parent and not all child objects.

On checkbox is assigned UICheckboxControlledComponent for hide/show GUI groups and workls well, parent and child objects are hide/show.

It's strange.

4
NGUI 3 Support / UITable and column direction ... bug?
« on: August 29, 2012, 12:07:58 PM »
Hi,

I have dynamicaly created content inside UITable organized in direction=Down and sort is OFF.
This works well on Desktop, but on Android are columns organized from UP, instead DOWN (ignored setup from inspector?).

Attached Images show result. FromPC + UnityEditor result is same and correct, but from android device looks wrong.

  1. void Start ()
  2.         {
  3.                 GlobalEditorData.cells = new TSourceCell[this.cellWidth,this.cellHeight];
  4.                
  5.                 this.table = NGUITools.FindInParents<UITable>(this.gameObject);
  6.                 this.panel = NGUITools.FindInParents<UIDraggablePanel>(table.gameObject);
  7.                 table.sorted = false;
  8.                 this.table.columns = this.cellWidth;
  9.                
  10.                 // create and rename objects to standard matrix direction from left -> right and from top -> down
  11.                
  12.                 for (int y=this.cellHeight;y>0;y--)                    
  13.                 for (int x=this.cellWidth;x>0;x--)
  14.                 {
  15.                        
  16.                         int cx = x-1;
  17.                         int cy = y-1;
  18.                         GlobalEditorData.cells[cx,cy] = new TSourceCell();                     
  19.                          
  20.                         GameObject cell = NGUITools.AddChild(this.gameObject,this.itemPrefab);
  21.                        
  22.                         GlobalEditorData.cells[cx,cy].name = "Cell_"+cx.ToString()+"x"+cy.ToString();
  23.                         GlobalEditorData.cells[cx,cy].item = cell;
  24.                         GlobalEditorData.cells[cx,cy].item.name = "Cell_"+cx.ToString()+"x"+cy.ToString();
  25.                        
  26.                         string path = "/UI Root (2D)/Camera/Anchor/Source_Window/SourcePanelEmpty/SourceTable/"+GlobalEditorData.cells[cx,cy].item.name+"/ButtonEmpty_CMD";
  27.                        
  28.                         GameObject o = GameObject.Find(path);
  29.                        
  30.                         GlobalEditorData.cells[cx,cy]._cmd = (OnClick_SourceCell)o.GetComponent<OnClick_SourceCell>();                         
  31.                         GlobalEditorData.cells[cx,cy]._cmd.parentName = GlobalEditorData.cells[cx,cy].item.name;
  32.                         GlobalEditorData.cells[cx,cy].icon = (UISlicedSprite)GlobalEditorData.cells[cx,cy]._cmd.GetComponentInChildren<UISlicedSprite>();
  33.                        
  34.                        
  35.                 }
  36.                
  37.                
  38.                 this.table.Reposition();
  39.                 this.panel.ResetPosition();
  40.                
  41.         }
  42.  


EDIT: Added 2 new screenshots (DesktopRelease and AndroidRelease). Same code, same method and different rersult. Now all cells are with desc. Column x Row.
Android rel. has table aligned = columns: from right -> left / rows: from botom -> up
PC rel. has table aligned  = columns: from left -> right / rows: from top -> down



Pages: [1]