static internal int checkDelegate(IntPtr l, int p, out UnityEngine.Experimental.LowLevel.PlayerLoopSystem.UpdateFunction ua)
        {
            int op = extractFunction(l, p);

            if (LuaDLL.lua_isnil(l, p))
            {
                ua = null;
                return(op);
            }
            else if (LuaDLL.lua_isuserdata(l, p) == 1)
            {
                ua = (UnityEngine.Experimental.LowLevel.PlayerLoopSystem.UpdateFunction)checkObj(l, p);
                return(op);
            }
            if (LuaDLL.lua_isnil(l, -1))
            {
                ua = null;
                return(op);
            }
            LuaDelegate ld;

            checkType(l, -1, out ld);
            LuaDLL.lua_pop(l, 1);
            if (ld.d != null)
            {
                ua = (UnityEngine.Experimental.LowLevel.PlayerLoopSystem.UpdateFunction)ld.d;
                return(op);
            }

            l  = LuaState.get(l).L;
            ua = () =>
            {
                int error = pushTry(l);

                ld.pcall(0, error);
                LuaDLL.lua_settop(l, error - 1);
            };
            ld.d = ua;
            return(op);
        }
        /** 追加。
         */
        public void Add(AddType a_addtype, System.Type a_target_type, System.Type a_add_type, UnityEngine_PlayerLoopSystem.PlayerLoopSystem.UpdateFunction a_add_callback)
        {
            if (this.callback != null)
            {
                this.raw = this.callback.Get();
            }

            {
                int t_index_count;
                int t_index_1;
                int t_index_2;
                int t_index_3;
                Find(ref this.raw, a_target_type, out t_index_count, out t_index_1, out t_index_2, out t_index_3);

                UnityEngine_PlayerLoopSystem.PlayerLoopSystem t_item = new UnityEngine_PlayerLoopSystem.PlayerLoopSystem();
                {
                    t_item.subSystemList  = null;
                    t_item.type           = a_add_type;
                    t_item.updateDelegate = a_add_callback;
                }

                System.Collections.Generic.List <UnityEngine_PlayerLoopSystem.PlayerLoopSystem> t_list;
                int t_index;

                switch (a_addtype)
                {
                case AddType.AddFirst:
                case AddType.AddLast:
                {
                    t_index = -1;

                    switch (t_index_count)
                    {
                    case 1:
                    {
                        t_list = new System.Collections.Generic.List <UnityEngine_PlayerLoopSystem.PlayerLoopSystem>(this.raw.subSystemList[t_index_1].subSystemList);
                    } break;

                    case 2:
                    {
                        t_list = new System.Collections.Generic.List <UnityEngine_PlayerLoopSystem.PlayerLoopSystem>(this.raw.subSystemList[t_index_1].subSystemList[t_index_2].subSystemList);
                    } break;

                    case 3:
                    {
                        t_list = new System.Collections.Generic.List <UnityEngine_PlayerLoopSystem.PlayerLoopSystem>(this.raw.subSystemList[t_index_1].subSystemList[t_index_2].subSystemList[t_index_3].subSystemList);
                    } break;

                    default:
                    {
                        Tool.Assert(false);
                        t_list = null;
                    } break;
                    }
                } break;

                case AddType.AddBefore:
                case AddType.AddAfter:
                {
                    switch (t_index_count)
                    {
                    case 1:
                    {
                        t_list  = new System.Collections.Generic.List <UnityEngine_PlayerLoopSystem.PlayerLoopSystem>(this.raw.subSystemList);
                        t_index = t_index_1;
                    } break;

                    case 2:
                    {
                        t_list  = new System.Collections.Generic.List <UnityEngine_PlayerLoopSystem.PlayerLoopSystem>(this.raw.subSystemList[t_index_1].subSystemList);
                        t_index = t_index_2;
                    } break;

                    case 3:
                    {
                        t_list  = new System.Collections.Generic.List <UnityEngine_PlayerLoopSystem.PlayerLoopSystem>(this.raw.subSystemList[t_index_1].subSystemList[t_index_2].subSystemList);
                        t_index = t_index_3;
                    } break;

                    default:
                    {
                        Tool.Assert(false);
                        t_list  = null;
                        t_index = -1;
                    } break;
                    }
                } break;

                default:
                {
                    Tool.Assert(false);
                    t_list  = null;
                    t_index = -1;
                } break;
                }

                switch (a_addtype)
                {
                case AddType.AddFirst:
                {
                    t_list.Insert(0, t_item);
                } break;

                case AddType.AddLast:
                {
                    t_list.Add(t_item);
                } break;

                case AddType.AddBefore:
                {
                    t_list.Insert(t_index, t_item);
                } break;

                case AddType.AddAfter:
                {
                    t_list.Insert(t_index + 1, t_item);
                } break;
                }

                switch (a_addtype)
                {
                case AddType.AddFirst:
                case AddType.AddLast:
                {
                    switch (t_index_count)
                    {
                    case 1:
                    {
                        this.raw.subSystemList[t_index_1].subSystemList = t_list.ToArray();
                    } break;

                    case 2:
                    {
                        this.raw.subSystemList[t_index_1].subSystemList[t_index_2].subSystemList = t_list.ToArray();
                    } break;

                    case 3:
                    {
                        this.raw.subSystemList[t_index_1].subSystemList[t_index_2].subSystemList[t_index_3].subSystemList = t_list.ToArray();
                    } break;

                    default:
                    {
                        t_list = null;
                        Tool.Assert(false);
                    } break;
                    }
                } break;

                case AddType.AddBefore:
                case AddType.AddAfter:
                {
                    switch (t_index_count)
                    {
                    case 1:
                    {
                        this.raw.subSystemList = t_list.ToArray();
                    } break;

                    case 2:
                    {
                        this.raw.subSystemList[t_index_1].subSystemList = t_list.ToArray();
                    } break;

                    case 3:
                    {
                        this.raw.subSystemList[t_index_1].subSystemList[t_index_2].subSystemList = t_list.ToArray();
                    } break;

                    default:
                    {
                        Tool.Assert(false);
                    } break;
                    }
                } break;
                }
            }

                        #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL)
            {
                this.Apply_DebugView(ref this.raw);
            }
                        #endif

            if (this.callback != null)
            {
                this.callback.Set(in this.raw);
            }
            else
            {
                try{
                    UnityEngine_PlayerLoopSystem.PlayerLoop.SetPlayerLoop(this.raw);
                }catch (System.Exception t_exception) {
                    Tool.DebugReThrow(t_exception);
                }
            }
        }