You are changing the transform's parent, but never notify the NGUI that this happened.Use NGUITools.MarkParentAsChanged(gameObject)