Exemplo n.º 1
0
    public static void Bind(LuaState L)
    {
        float t = Time.realtimeSinceStartup;

        L.BeginModule(null);
        LuaInterface_DebuggerWrap.Register(L);
        LuaCallCSharpWrap.Register(L);
        TestWrap.Register(L);
        testEnumWrap.Register(L);
        Lesson3Wrap.Register(L);
        Lesson4Wrap.Register(L);
        Lesson5Wrap.Register(L);
        Lesson6Wrap.Register(L);
        Lesson7Wrap.Register(L);
        LuaProfilerWrap.Register(L);
        L.RegFunction("CustomDelegater", CustomDelegater);
        L.RegFunction("CustomDelegaterref", CustomDelegaterref);
        L.RegFunction("CustomCallParamsDelegater", CustomCallParamsDelegater);
        L.BeginModule("LuaInterface");
        LuaInterface_LuaInjectionStationWrap.Register(L);
        LuaInterface_InjectTypeWrap.Register(L);
        L.EndModule();
        L.BeginModule("UnityEngine");
        UnityEngine_DebugWrap.Register(L);
        UnityEngine_PrimitiveTypeWrap.Register(L);
        UnityEngine_ComponentWrap.Register(L);
        UnityEngine_TransformWrap.Register(L);
        UnityEngine_MaterialWrap.Register(L);
        UnityEngine_LightWrap.Register(L);
        UnityEngine_CameraWrap.Register(L);
        UnityEngine_AudioSourceWrap.Register(L);
        UnityEngine_BehaviourWrap.Register(L);
        UnityEngine_MonoBehaviourWrap.Register(L);
        UnityEngine_GameObjectWrap.Register(L);
        UnityEngine_TrackedReferenceWrap.Register(L);
        UnityEngine_ApplicationWrap.Register(L);
        UnityEngine_PhysicsWrap.Register(L);
        UnityEngine_ColliderWrap.Register(L);
        UnityEngine_TimeWrap.Register(L);
        UnityEngine_TextureWrap.Register(L);
        UnityEngine_Texture2DWrap.Register(L);
        UnityEngine_ShaderWrap.Register(L);
        UnityEngine_RendererWrap.Register(L);
        UnityEngine_WWWWrap.Register(L);
        UnityEngine_ScreenWrap.Register(L);
        UnityEngine_CameraClearFlagsWrap.Register(L);
        UnityEngine_AudioClipWrap.Register(L);
        UnityEngine_AssetBundleWrap.Register(L);
        UnityEngine_ParticleSystemWrap.Register(L);
        UnityEngine_AsyncOperationWrap.Register(L);
        UnityEngine_LightTypeWrap.Register(L);
        UnityEngine_SleepTimeoutWrap.Register(L);
        UnityEngine_AnimatorWrap.Register(L);
        UnityEngine_InputWrap.Register(L);
        UnityEngine_KeyCodeWrap.Register(L);
        UnityEngine_SkinnedMeshRendererWrap.Register(L);
        UnityEngine_SpaceWrap.Register(L);
        UnityEngine_AnimationBlendModeWrap.Register(L);
        UnityEngine_QueueModeWrap.Register(L);
        UnityEngine_PlayModeWrap.Register(L);
        UnityEngine_WrapModeWrap.Register(L);
        UnityEngine_QualitySettingsWrap.Register(L);
        UnityEngine_RenderSettingsWrap.Register(L);
        UnityEngine_ResourcesWrap.Register(L);
        UnityEngine_AudioBehaviourWrap.Register(L);
        L.BeginModule("Events");
        L.RegFunction("UnityAction", UnityEngine_Events_UnityAction);
        L.EndModule();
        L.BeginModule("Camera");
        L.RegFunction("CameraCallback", UnityEngine_Camera_CameraCallback);
        L.EndModule();
        L.BeginModule("Application");
        L.RegFunction("AdvertisingIdentifierCallback", UnityEngine_Application_AdvertisingIdentifierCallback);
        L.RegFunction("LowMemoryCallback", UnityEngine_Application_LowMemoryCallback);
        L.RegFunction("LogCallback", UnityEngine_Application_LogCallback);
        L.EndModule();
        L.BeginModule("AudioClip");
        L.RegFunction("PCMReaderCallback", UnityEngine_AudioClip_PCMReaderCallback);
        L.RegFunction("PCMSetPositionCallback", UnityEngine_AudioClip_PCMSetPositionCallback);
        L.EndModule();
        L.EndModule();
        L.BeginModule("MyTest");
        MyTest_Test2Wrap.Register(L);
        L.EndModule();
        L.BeginModule("System");
        System_Int32Wrap.Register(L);
        L.RegFunction("Action", System_Action);
        L.RegFunction("Predicate_int", System_Predicate_int);
        L.RegFunction("Action_int", System_Action_int);
        L.RegFunction("Comparison_int", System_Comparison_int);
        L.RegFunction("Func_int_int", System_Func_int_int);
        L.RegFunction("Predicate_string", System_Predicate_string);
        L.RegFunction("Action_string", System_Action_string);
        L.RegFunction("Comparison_string", System_Comparison_string);
        L.RegFunction("Action_bool", System_Action_bool);
        L.RegFunction("Func_bool", System_Func_bool);
        L.RegFunction("Action_UnityEngine_AsyncOperation", System_Action_UnityEngine_AsyncOperation);
        L.BeginModule("Collections");
        L.BeginModule("Generic");
        System_Collections_Generic_List_stringWrap.Register(L);
        System_Collections_Generic_Dictionary_int_stringWrap.Register(L);
        L.EndModule();
        L.EndModule();
        L.EndModule();
        L.EndModule();
        L.BeginPreLoad();
        L.AddPreLoad("UnityEngine.MeshRenderer", LuaOpen_UnityEngine_MeshRenderer, typeof(UnityEngine.MeshRenderer));
        L.AddPreLoad("UnityEngine.BoxCollider", LuaOpen_UnityEngine_BoxCollider, typeof(UnityEngine.BoxCollider));
        L.AddPreLoad("UnityEngine.MeshCollider", LuaOpen_UnityEngine_MeshCollider, typeof(UnityEngine.MeshCollider));
        L.AddPreLoad("UnityEngine.SphereCollider", LuaOpen_UnityEngine_SphereCollider, typeof(UnityEngine.SphereCollider));
        L.AddPreLoad("UnityEngine.CharacterController", LuaOpen_UnityEngine_CharacterController, typeof(UnityEngine.CharacterController));
        L.AddPreLoad("UnityEngine.CapsuleCollider", LuaOpen_UnityEngine_CapsuleCollider, typeof(UnityEngine.CapsuleCollider));
        L.AddPreLoad("UnityEngine.Animation", LuaOpen_UnityEngine_Animation, typeof(UnityEngine.Animation));
        L.AddPreLoad("UnityEngine.AnimationClip", LuaOpen_UnityEngine_AnimationClip, typeof(UnityEngine.AnimationClip));
        L.AddPreLoad("UnityEngine.AnimationState", LuaOpen_UnityEngine_AnimationState, typeof(UnityEngine.AnimationState));
        L.AddPreLoad("UnityEngine.SkinWeights", LuaOpen_UnityEngine_SkinWeights, typeof(UnityEngine.SkinWeights));
        L.AddPreLoad("UnityEngine.RenderTexture", LuaOpen_UnityEngine_RenderTexture, typeof(UnityEngine.RenderTexture));
        L.AddPreLoad("UnityEngine.Rigidbody", LuaOpen_UnityEngine_Rigidbody, typeof(UnityEngine.Rigidbody));
        L.EndPreLoad();
        Debugger.Log("Register lua type cost time: {0}", Time.realtimeSinceStartup - t);
    }
Exemplo n.º 2
0
    public static void Bind(LuaState L)
    {
        float t = Time.realtimeSinceStartup;

        L.BeginModule(null);
        LuaInterface_DebuggerWrap.Register(L);
        LuaProfilerWrap.Register(L);
        UIPanelWrap.Register(L);
        UILabelWrap.Register(L);
        UIGridWrap.Register(L);
        TestWrap.Register(L);
        UIRectWrap.Register(L);
        UIWidgetWrap.Register(L);
        UIWidgetContainerWrap.Register(L);
        BaseWrap.Register(L);
        ManagerWrap.Register(L);
        L.BeginModule("LuaInterface");
        LuaInterface_LuaInjectionStationWrap.Register(L);
        LuaInterface_InjectTypeWrap.Register(L);
        L.EndModule();
        L.BeginModule("UnityEngine");
        UnityEngine_ComponentWrap.Register(L);
        UnityEngine_TransformWrap.Register(L);
        UnityEngine_MaterialWrap.Register(L);
        UnityEngine_LightWrap.Register(L);
        UnityEngine_CameraWrap.Register(L);
        UnityEngine_AudioSourceWrap.Register(L);
        UnityEngine_BehaviourWrap.Register(L);
        UnityEngine_MonoBehaviourWrap.Register(L);
        UnityEngine_GameObjectWrap.Register(L);
        UnityEngine_TrackedReferenceWrap.Register(L);
        UnityEngine_ApplicationWrap.Register(L);
        UnityEngine_PhysicsWrap.Register(L);
        UnityEngine_ColliderWrap.Register(L);
        UnityEngine_TimeWrap.Register(L);
        UnityEngine_TextureWrap.Register(L);
        UnityEngine_Texture2DWrap.Register(L);
        UnityEngine_ShaderWrap.Register(L);
        UnityEngine_RendererWrap.Register(L);
        UnityEngine_WWWWrap.Register(L);
        UnityEngine_ScreenWrap.Register(L);
        UnityEngine_CameraClearFlagsWrap.Register(L);
        UnityEngine_AudioClipWrap.Register(L);
        UnityEngine_AssetBundleWrap.Register(L);
        UnityEngine_ParticleSystemWrap.Register(L);
        UnityEngine_AsyncOperationWrap.Register(L);
        UnityEngine_LightTypeWrap.Register(L);
        UnityEngine_SleepTimeoutWrap.Register(L);
        UnityEngine_AnimatorWrap.Register(L);
        UnityEngine_InputWrap.Register(L);
        UnityEngine_KeyCodeWrap.Register(L);
        UnityEngine_SkinnedMeshRendererWrap.Register(L);
        UnityEngine_SpaceWrap.Register(L);
        UnityEngine_AnimationBlendModeWrap.Register(L);
        UnityEngine_QueueModeWrap.Register(L);
        UnityEngine_PlayModeWrap.Register(L);
        UnityEngine_WrapModeWrap.Register(L);
        UnityEngine_QualitySettingsWrap.Register(L);
        UnityEngine_RenderSettingsWrap.Register(L);
        UnityEngine_ResourcesWrap.Register(L);
        L.BeginModule("Events");
        L.RegFunction("UnityAction", UnityEngine_Events_UnityAction);
        L.EndModule();
        L.BeginModule("Camera");
        L.RegFunction("CameraCallback", UnityEngine_Camera_CameraCallback);
        L.EndModule();
        L.BeginModule("Application");
        L.RegFunction("LowMemoryCallback", UnityEngine_Application_LowMemoryCallback);
        L.RegFunction("AdvertisingIdentifierCallback", UnityEngine_Application_AdvertisingIdentifierCallback);
        L.RegFunction("LogCallback", UnityEngine_Application_LogCallback);
        L.EndModule();
        L.BeginModule("AudioClip");
        L.RegFunction("PCMReaderCallback", UnityEngine_AudioClip_PCMReaderCallback);
        L.RegFunction("PCMSetPositionCallback", UnityEngine_AudioClip_PCMSetPositionCallback);
        L.EndModule();
        L.EndModule();
        L.BeginModule("LuaFramework");
        LuaFramework_UtilWrap.Register(L);
        LuaFramework_WrapGridWrap.Register(L);
        LuaFramework_AppConstWrap.Register(L);
        LuaFramework_LuaHelperWrap.Register(L);
        LuaFramework_ByteBufferWrap.Register(L);
        LuaFramework_LuaBehaviourWrap.Register(L);
        LuaFramework_GameManagerWrap.Register(L);
        LuaFramework_LuaManagerWrap.Register(L);
        LuaFramework_PanelManagerWrap.Register(L);
        LuaFramework_SoundManagerWrap.Register(L);
        LuaFramework_TimerManagerWrap.Register(L);
        LuaFramework_ThreadManagerWrap.Register(L);
        LuaFramework_NetworkManagerWrap.Register(L);
        LuaFramework_ResourceManagerWrap.Register(L);
        L.EndModule();
        L.BeginModule("DigiSky");
        L.BeginModule("AssetBundleKit");
        DigiSky_AssetBundleKit_AbMgrWrap.Register(L);
        DigiSky_AssetBundleKit_ImgeMgrWrap.Register(L);
        L.EndModule();
        L.EndModule();
        L.BeginModule("System");
        L.RegFunction("Action", System_Action);
        L.RegFunction("Predicate_int", System_Predicate_int);
        L.RegFunction("Action_int", System_Action_int);
        L.RegFunction("Comparison_int", System_Comparison_int);
        L.RegFunction("Func_int_int", System_Func_int_int);
        L.RegFunction("Action_UnityEngine_AsyncOperation", System_Action_UnityEngine_AsyncOperation);
        L.RegFunction("Comparison_UnityEngine_Transform", System_Comparison_UnityEngine_Transform);
        L.RegFunction("Action_NotiData", System_Action_NotiData);
        L.EndModule();
        L.BeginModule("UIPanel");
        L.RegFunction("OnGeometryUpdated", UIPanel_OnGeometryUpdated);
        L.RegFunction("OnClippingMoved", UIPanel_OnClippingMoved);
        L.EndModule();
        L.BeginModule("UIWidget");
        L.RegFunction("OnDimensionsChanged", UIWidget_OnDimensionsChanged);
        L.RegFunction("OnPostFillCallback", UIWidget_OnPostFillCallback);
        L.RegFunction("HitCheck", UIWidget_HitCheck);
        L.EndModule();
        L.BeginModule("UIDrawCall");
        L.RegFunction("OnRenderCallback", UIDrawCall_OnRenderCallback);
        L.EndModule();
        L.BeginModule("UIGrid");
        L.RegFunction("OnReposition", UIGrid_OnReposition);
        L.EndModule();
        L.EndModule();
        L.BeginPreLoad();
        L.AddPreLoad("UnityEngine.MeshRenderer", LuaOpen_UnityEngine_MeshRenderer, typeof(UnityEngine.MeshRenderer));
        L.AddPreLoad("UnityEngine.BoxCollider", LuaOpen_UnityEngine_BoxCollider, typeof(UnityEngine.BoxCollider));
        L.AddPreLoad("UnityEngine.MeshCollider", LuaOpen_UnityEngine_MeshCollider, typeof(UnityEngine.MeshCollider));
        L.AddPreLoad("UnityEngine.SphereCollider", LuaOpen_UnityEngine_SphereCollider, typeof(UnityEngine.SphereCollider));
        L.AddPreLoad("UnityEngine.CharacterController", LuaOpen_UnityEngine_CharacterController, typeof(UnityEngine.CharacterController));
        L.AddPreLoad("UnityEngine.CapsuleCollider", LuaOpen_UnityEngine_CapsuleCollider, typeof(UnityEngine.CapsuleCollider));
        L.AddPreLoad("UnityEngine.Animation", LuaOpen_UnityEngine_Animation, typeof(UnityEngine.Animation));
        L.AddPreLoad("UnityEngine.AnimationClip", LuaOpen_UnityEngine_AnimationClip, typeof(UnityEngine.AnimationClip));
        L.AddPreLoad("UnityEngine.AnimationState", LuaOpen_UnityEngine_AnimationState, typeof(UnityEngine.AnimationState));
        L.AddPreLoad("UnityEngine.BlendWeights", LuaOpen_UnityEngine_BlendWeights, typeof(UnityEngine.BlendWeights));
        L.AddPreLoad("UnityEngine.RenderTexture", LuaOpen_UnityEngine_RenderTexture, typeof(UnityEngine.RenderTexture));
        L.AddPreLoad("UnityEngine.Rigidbody", LuaOpen_UnityEngine_Rigidbody, typeof(UnityEngine.Rigidbody));
        L.EndPreLoad();
        Debugger.Log("Register lua type cost time: {0}", Time.realtimeSinceStartup - t);
    }