Exemplo n.º 1
0
    void OnEnable()
    {
        if (gameObject.activeInHierarchy)
        {
            m_oldText  = "";
            m_fontInfo = null;

            // set default material
            var mat = new Material(Shader.Find("Standard"));
            if (materials[0] == null)
            {
                materials[0] = mat;
            }
            if (materials[1] == null)
            {
                materials[1] = mat;
            }
            if (materials[2] == null)
            {
                materials[2] = mat;
            }

            layout.CheckClearModified();
            Physics.CheckClearModified();
            AdditionalComponents.CheckClearModified();
        }
    }
Exemplo 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)
 {
     parameter.CheckClearModified();
     layout.CheckClearModified();
     if (updateMesh)
     {
         // Debug.Log("update mesh");
         Rebuild();
     }
     else if (updateLayout)
     {
         // Debug.Log("update layout");
         UpdateLayout();
     }
 }