Retain() public method

引用计数增一
public Retain ( ) : void
return void
    static int Retain(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                Tangzx.ABSystem.AssetBundleInfo obj = (Tangzx.ABSystem.AssetBundleInfo)ToLua.CheckObject <Tangzx.ABSystem.AssetBundleInfo>(L, 1);
                obj.Retain();
                return(0);
            }
            else if (count == 2)
            {
                Tangzx.ABSystem.AssetBundleInfo obj = (Tangzx.ABSystem.AssetBundleInfo)ToLua.CheckObject <Tangzx.ABSystem.AssetBundleInfo>(L, 1);
                UnityEngine.Object arg0             = (UnityEngine.Object)ToLua.CheckObject <UnityEngine.Object>(L, 2);
                obj.Retain(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Tangzx.ABSystem.AssetBundleInfo.Retain"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Exemplo n.º 2
0
 public void AddDependency(AssetBundleInfo target)
 {
     if (target != null && deps.Add(target))
     {
         target.Retain();
         target.depChildren.Add(this.bundleName);
     }
 }
Exemplo n.º 3
0
 public void AddDependency(AssetBundleInfo target)
 {
     if (target != null && deps.Add(target))
     {
         target.Retain();
         target.depChildren.Add(this.bundleName);
     }
 }