UIWidget.MarkAsChanged C# (CSharp) Method

MarkAsChanged() public method

Tell the panel responsible for the widget that something has changed and the buffers need to be rebuilt.
public MarkAsChanged ( ) : void
return void
    public virtual void MarkAsChanged()
    {
        mChanged = true;

        // If we're in the editor, update the panel right away so its geometry gets updated.
        if (mPanel != null && enabled && NGUITools.GetActive(gameObject) && !Application.isPlaying && material != null)
        {
            mPanel.AddWidget(this);
            CheckLayer();
        #if UNITY_EDITOR
            // Mark the panel as dirty so it gets updated
            UnityEditor.EditorUtility.SetDirty(mPanel.gameObject);
        #endif
        }
    }

Usage Example

 public void MarkWidgetAsChanged_NGUI(bool MarkVertices = true, bool MarkMaterial = false)
 {
     if (mNGUI_Widget)
     {
         if (MarkMaterial)
         {
             mNGUI_Widget.RemoveFromPanel();
         }
         mNGUI_Widget.MarkAsChanged();
     }
 }
All Usage Examples Of UIWidget::MarkAsChanged