Ejemplo n.º 1
0
 /// <summary>
 /// Checks the rebuild.
 ///
 /// use by Editor only
 /// </summary>
 /// <param name="updateMesh">If set to <c>true</c> update mesh.</param>
 /// <param name="updateLayout">If set to <c>true</c> update layout.</param>
 public void CheckRebuild(bool updateMesh, bool updateLayout)
 {
     parameter.CheckClearModified();
     layout.CheckClearModified();
     if (updateMesh)
     {
         // Debug.Log("update mesh");
         Rebuild();
     }
     else if (updateLayout)
     {
         // Debug.Log("update layout");
         UpdateLayout();
     }
 }
Ejemplo n.º 2
0
    /// <summary>
    /// Checks the rebuild.
    ///
    /// use by Editor only
    /// </summary>
    /// <param name="updateMesh">If set to <c>true</c> update mesh.</param>
    /// <param name="updateLayout">If set to <c>true</c> update layout.</param>
    public void CheckRebuild(bool updateMesh, bool updateLayout, bool updatePhysics, bool updateAdditionalComponents)
    {
        if (this == null || !this.gameObject.activeInHierarchy)
        {
            return;
        }

        parameter.CheckClearModified();
        layout.CheckClearModified();
        Physics.CheckClearModified();
        AdditionalComponents.CheckClearModified();

        if (updateMesh)
        {
            //Debug.Log("update mesh");
            Rebuild(true);
            UpdatePhysics();
            UpdateAdditionalComponents();
        }
        else if (updateLayout)
        {
            // Debug.Log("update layout");
            UpdateLayout();
            UpdatePhysics();
            UpdateAdditionalComponents();
        }
        else if (updatePhysics)
        {
            UpdatePhysics();
            UpdateAdditionalComponents();
        }
        else if (updateAdditionalComponents)
        {
            UpdateAdditionalComponents();
        }
    }