SetChildIndexBefore() public method

Moves a child to a certain position which is in front of the child previously at given index. 与SetChildIndex不同的是,如果child原来在index的前面,那么child插入的位置是index-1,即保证排在原来占据index的对象的前面。
public SetChildIndexBefore ( GObject child, int index ) : int
child GObject
index int
return int
 static int SetChildIndexBefore(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.GComponent obj  = (FairyGUI.GComponent)ToLua.CheckObject(L, 1, typeof(FairyGUI.GComponent));
         FairyGUI.GObject    arg0 = (FairyGUI.GObject)ToLua.CheckObject(L, 2, typeof(FairyGUI.GObject));
         int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         int o    = obj.SetChildIndexBefore(arg0, arg1);
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }