コード例 #1
0
        static int _m_Begin(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Profiling.CustomSampler __cl_gen_to_be_invoked = (UnityEngine.Profiling.CustomSampler)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 1)
                {
                    __cl_gen_to_be_invoked.Begin(  );



                    return(0);
                }
                if (__gen_param_count == 2 && translator.Assignable <UnityEngine.Object>(L, 2))
                {
                    UnityEngine.Object targetObject = (UnityEngine.Object)translator.GetObject(L, 2, typeof(UnityEngine.Object));

                    __cl_gen_to_be_invoked.Begin(targetObject);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Profiling.CustomSampler.Begin!"));
        }
コード例 #2
0
        protected virtual void AfterBind()
        {
            if (UseParallelSystemComponentsProcessing())
            {
#if UNITY_EDITOR
                sampler = UnityEngine.Profiling.CustomSampler.Create(SystemName);
#endif
                parallelSystemComponentProcessor = new ParallelSystemComponentsProcessor <TComponents>(ProcessAtIndex);
            }
        }
コード例 #3
0
        static StackObject *End_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Profiling.CustomSampler instance_of_this_method = (UnityEngine.Profiling.CustomSampler) typeof(UnityEngine.Profiling.CustomSampler).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.End();

            return(__ret);
        }
コード例 #4
0
ファイル: ComponentSystem.cs プロジェクト: Lozamded/IPG_RTA01
        internal void CreateInstance(World world)
        {
            OnBeforeCreateInternal(world);
            try
            {
                OnCreateManager(); // DELETE after obsolete period!
                OnCreate();
#if UNITY_EDITOR
                var type = GetType();
                m_Sampler = UnityEngine.Profiling.CustomSampler.Create($"{world.Name} {type.FullName}");
#endif
            }
            catch
            {
                OnBeforeDestroyInternal();
                OnAfterDestroyInternal();
                throw;
            }
        }
コード例 #5
0
        static int _m_End(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Profiling.CustomSampler __cl_gen_to_be_invoked = (UnityEngine.Profiling.CustomSampler)translator.FastGetCSObj(L, 1);


            try {
                {
                    __cl_gen_to_be_invoked.End(  );



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
コード例 #6
0
        static int _m_Create_xlua_st_(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



            try {
                {
                    string name = LuaAPI.lua_tostring(L, 1);

                    UnityEngine.Profiling.CustomSampler __cl_gen_ret = UnityEngine.Profiling.CustomSampler.Create(name);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
コード例 #7
0
 public DisposableStruct(UnityEngine.Profiling.CustomSampler customSampler)
 {
     _sampler = customSampler;
     _sampler.Begin();
 }