static int Set(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UI.ImageEx obj  = (UI.ImageEx)ToLua.CheckObject(L, 1, typeof(UI.ImageEx));
         string     arg0 = ToLua.CheckString(L, 2);
         obj.Set(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
        int SetImageProgress(ImageEx image, float value)
        {
            if (value <= 0)
            {
                if (image != null)
                {
                    image.fillAmount = 0;
                }
                return(0);
            }

            int   num       = GetNumOfValue(value);
            float unitValue = Mathf.Clamp01((value % Unit) / Unit);

            if (unitValue == 0)
            {
                unitValue = 1;
            }

            //替换对应条数的图片
            if (m_spriteNames != null && num <= m_spriteNames.Length)
            {
                if (image != null)
                {
                    image.Set(m_spriteNames[num - 1]);
                }
            }
            else if (m_sprites != null && num <= m_sprites.Length)
            {
                if (image != null)
                {
                    image.overrideSprite = m_sprites[num - 1];
                }
            }

            //设置进度
            if (image != null)
            {
                image.fillAmount = unitValue;
            }
            EditorUtil.SetDirty(image);
            return(num);
        }