UIWidget.CheckLayer C# (CSharp) Method

CheckLayer() public method

Check to ensure that the widget resides on the same layer as its panel.
public CheckLayer ( ) : void
return void
    public void CheckLayer()
    {
        if (mPanel != null && mPanel.gameObject.layer != gameObject.layer)
        {
            Debug.LogWarning("You can't place widgets on a layer different than the UIPanel that manages them.\n" +
                "If you want to move widgets to a different layer, parent them to a new panel instead.", this);
            gameObject.layer = mPanel.gameObject.layer;
        }
    }

Usage Example

Esempio n. 1
0
 static public int CheckLayer(IntPtr l)
 {
     try {
         UIWidget self = (UIWidget)checkSelf(l);
         self.CheckLayer();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of UIWidget::CheckLayer