protected override void OnDrawPropertiesGUI(Material material, MaterialProperty[] props)
 {
     if (!ShaderGUIHelper.IsModeMatched(this, m_args) || !GetBoolTestResult(material, props))
     {
         return;
     }
     if (!String.IsNullOrEmpty(m_text))
     {
         var jo = m_args.GetField("params");
         m_args.GetField(out m_fontSize, "fontsize", 0);
         List <object> pars = null;
         if (jo != null)
         {
             if (jo.IsArray)
             {
                 for (int i = 0; i < jo.Count; ++i)
                 {
                     var o = jo[i];
                     if (o != null && !o.isContainer)
                     {
                         pars = pars ?? new List <object>();
                         pars.Add(ShaderGUIHelper.JSONValueToString(o));
                     }
                 }
             }
             else if (jo.IsObject == false)
             {
                 pars = pars ?? new List <object>();
                 pars.Add(ShaderGUIHelper.JSONValueToString(jo));
             }
         }
         for ( ; ;)
         {
             var text = m_text;
             var m    = Regex.Matches(m_text, @"\{(\d+)\}");
             if (m.Count > 0)
             {
                 var maxIndex = 0;
                 for (int i = 0; i < m.Count; ++i)
                 {
                     var groups = m[i].Groups;
                     if (groups.Count == 2)
                     {
                         var index = -1;
                         if (int.TryParse(groups[1].ToString(), out index))
                         {
                             if (index > maxIndex && index >= 0)
                             {
                                 maxIndex = index;
                             }
                         }
                     }
                 }
                 if (maxIndex >= 0)
                 {
                     pars = pars ?? new List <object>();
                     if (pars.Count < maxIndex + 1)
                     {
                         pars.Resize(maxIndex + 1);
                     }
                     for (int i = 0; i < pars.Count; ++i)
                     {
                         var ref_id = pars[i] as String;
                         if (!String.IsNullOrEmpty(ref_id))
                         {
                             var prop = FindPropEditor <UnitMaterialEditor>(ref_id);
                             if (prop != null)
                             {
                                 var v = prop.GetReturnValue(props);
                                 if (String.IsNullOrEmpty(v))
                                 {
                                     v = "null";
                                 }
                                 pars[i] = v;
                             }
                         }
                     }
                     text = String.Format(m_text, pars.ToArray());
                 }
             }
             var _richText = m_style.richText;
             var _fontSize = m_style.fontSize;
             m_style.richText = true;
             if (m_fontSize > 0)
             {
                 m_style.fontSize = m_fontSize;
             }
             EditorGUILayout.HelpBox(text, m_type);
             m_style.richText = _richText;
             m_style.fontSize = _fontSize;
             break;
         }
     }
 }