/// <summary> /// Tell the panel responsible for the widget that something has changed and the buffers need to be rebuilt. /// </summary> 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 } }
/// <summary> /// Ensure we have a panel referencing this widget. /// </summary> public UIPanel CreatePanel() { if (mStarted && panel == null && enabled && NGUITools.GetActive(gameObject)) { panel = UIPanel.Find(cachedTransform, true, cachedGameObject.layer); if (panel != null) { panel.AddWidget(this); CheckLayer(); Invalidate(true); } } return(panel); }
public UIPanel CreatePanel() { if (mStarted && panel == null && base.enabled && NGUITools.GetActive(base.gameObject)) { panel = UIPanel.Find(base.cachedTransform, /*createIfMissing:*/ true, base.cachedGameObject.layer); if (panel != null) { mParentFound = false; panel.AddWidget(this); CheckLayer(); Invalidate(includeChildren: true); } } return(panel); }
static int AddWidget(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UIPanel obj = (UIPanel)ToLua.CheckObject<UIPanel>(L, 1); UIWidget arg0 = (UIWidget)ToLua.CheckObject<UIWidget>(L, 2); obj.AddWidget(arg0); return 0; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } }
public UIPanel CreatePanel() { //if (panel == null && enabled && NGUITools.GetActive(gameObject)) //{ panel = UIPanel.Find(cachedTransform, true, cachedGameObject.layer); if (panel != null) { //mParentFound = false; panel.AddWidget(this); //CheckLayer(); //Invalidate(true); } //} return(panel); }
/// <summary> /// Ensure we have a panel referencing this widget. /// </summary> void CreatePanel() { if (gameObject != null && mPanel == null && enabled && gameObject.activeSelf && gameObject.activeInHierarchy) { if (cachedTransform == null) { Debug.LogWarning("Cache Panel False"); } mPanel = UIPanel.Find(cachedTransform); if (mPanel != null) { CheckLayer(); mPanel.AddWidget(this); mChanged = true; } } }
/// <summary> /// Ensure we have a panel referencing this widget. /// </summary> public UIPanel CreatePanel() { if (mStarted && panel == null && enabled && NGUITools.GetActive(gameObject)) { panel = UIPanel.Find(cachedTransform, true, cachedGameObject.layer); if (panel != null) { mParentFound = false; // if (material != null) { //add by chenbin panel.AddWidget(this); // } CheckLayer(); Invalidate(true); } } return(panel); }
/// <summary> /// Ensure we have a panel referencing this widget. /// </summary> public void CreatePanel () { if (mPanel == null && enabled && NGUITools.GetActive(gameObject) && material != null) { mPanel = UIPanel.Find(cachedTransform); if (mPanel != null) { CheckLayer(); mPanel.AddWidget(this); mChanged = true; } } }
/// <summary> /// Ensure we have a panel referencing this widget. /// </summary> void CreatePanel() { if (mPanel == null && enabled && gameObject.active && material != null) { mPanel = UIPanel.Find(cachedTransform); if (mPanel != null) { CheckLayer(); mPanel.AddWidget(this); mChanged = true; } } }
/// <summary> /// Ensure we have a panel referencing this widget. /// </summary> public UIPanel CreatePanel () { if (mStarted && panel == null && enabled && NGUITools.GetActive(gameObject)) { panel = UIPanel.Find(cachedTransform, true, cachedGameObject.layer); if (panel != null) { mParentFound = false; panel.AddWidget(this); CheckLayer(); Invalidate(true); } } return panel; }