Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Virtual on March 12, 2013, 04:23:05 AM

Title: sliced sprite not showing up
Post by: Virtual on March 12, 2013, 04:23:05 AM
Hi I am having some issues where after moving an object that has a sprite attached to it (layer set up properly) and re parenting it it wouldn't show up i am at a loss  ???
  1.         UIFrameDragable contcache =  cont.GetComponentInChildren<UIFrameDragable>();
  2.                                
  3.                                         mTrans.parent = contcache.origParent;                                          
  4.                                         cont.transform.parent = origParent;
  5.                                         mTrans.localPosition = new Vector3(0, 0, -1);//cont.GetComponentInChildren<UIFrameDragable>().origParent.position;
  6.                                         cont.transform.localPosition = new Vector3(0, 0, -1);
  7.                                        
  8.                                         cont.transform.parent.GetComponentInChildren<BattlePetsDragDropContainer>().collider.enabled = false;
  9.                                        
  10.                                         mTrans.parent.GetComponentInChildren<DragDropContainer>().collider.enabled = false;
  11.                                         origParent = mTrans.parent;
  12.                                         contcache.origParent = contcache.transform.parent;
  13.                                         BroadcastMessage("CheckParent", SendMessageOptions.DontRequireReceiver);
  14.                                         cont.BroadcastMessage("CheckParent",SendMessageOptions.DontRequireReceiver);
any help would be good  :)
Title: Re: sliced sprite not showing up
Post by: Virtual on March 12, 2013, 04:25:20 AM
just in case anyone has a similar issue the fix was

  1. BroadcastMessage("MarkAsChanged", SendMessageOptions.DontRequireReceiver);     
  2. cont.BroadcastMessage("MarkAsChanged",SendMessageOptions.DontRequireReceiver);

:D