protected void InitDll()
    {
        if (!FCDll.IsInitDll())
        {
            try
            {
                if (IsRecrodLog())
                {
                    FCLibHelper.fc_set_debug_print_func(print_error);
                    FCLibHelper.fc_set_output_error_func(print_error);

                    FCDll.InitDll();

                    FCLibHelper.fc_set_debug_print_func(print_error);
                    FCLibHelper.fc_set_output_error_func(print_error);
                }
                else
                {
                    FCDll.InitDll();
                }

                // 启动调试器, 启动后,就可以用工具附加调试了,默认端口是2600
                FCLibHelper.fc_switch_debug(true);
                // FCLibHelper.fc_start_debug(3000); // 指定3000这个端口并启动调试器
            }
            catch (Exception e)
            {
                print_error(e.ToString());
            }
            LoadByteCode(OnLoadScriptCallback);
        }
    }
    void  InitDll()
    {
        if (!FCDll.IsInitDll())
        {
            try
            {
                FCLibHelper.fc_set_debug_print_func(print_error);
                FCLibHelper.fc_set_output_error_func(print_error);

                FCDll.InitDll();

                FCLibHelper.fc_set_debug_print_func(print_error);
                FCLibHelper.fc_set_output_error_func(print_error);

                // 注册两个测试函数
                FCLibHelper.fc_register_func("fc2csharp_set_vector3", fc2csharp_set_vector3);
                FCLibHelper.fc_register_func("fc2csharp_set_vector4", fc2csharp_set_vector4);
                FCLibHelper.fc_register_func("fc2csharp_set_string", fc2csharp_set_string);
            }
            catch (Exception e)
            {
                print_error(e.ToString());
            }
            StartCoroutine(LoadByteCode());
        }
    }
예제 #3
0
    public void InitDll()
    {
        if (!FCDll.IsInitDll())
        {
            try
            {
                FCLibHelper.fc_set_debug_print_func(print_error);
                FCLibHelper.fc_set_output_error_func(print_error);

                FCDll.InitDll();

                FCLibHelper.fc_set_debug_print_func(print_error);
                FCLibHelper.fc_set_output_error_func(print_error);

                // 启动调试器, 启动后,就可以用工具附加调试了,默认端口是2600
                FCLibHelper.fc_switch_debug(true);
                // FCLibHelper.fc_start_debug(3000); // 指定3000这个端口并启动调试器
            }
            catch (Exception e)
            {
                print_error(e.ToString());
            }
            StartCoroutine(LoadByteCode());
        }
    }
예제 #4
0
    protected void InitDll(bool bLoadByteCode = true)
    {
        if (!FCDll.IsInitDll())
        {
            m_bLoadScript = false;
            try
            {
                if (IsRecrodLog())
                {
                    FCLibHelper.fc_set_debug_print_func(print_error);
                    FCLibHelper.fc_set_output_error_func(print_error);

                    m_VMPtr = FCDll.InitDll();

                    FCLibHelper.fc_set_debug_print_func(print_error);
                    FCLibHelper.fc_set_output_error_func(print_error);
                }
                else
                {
                    m_VMPtr = FCDll.InitDll();
                }

#if  UNITY_EDITOR
                // 启动调试器, 启动后,就可以用工具附加调试了,默认端口是2600
                FCLibHelper.fc_switch_debug(true);
                // FCLibHelper.fc_start_debug(3000); // 指定3000这个端口并启动调试器
#endif
            }
            catch (Exception e)
            {
                print_error(e.ToString());
            }
            if (bLoadByteCode)
            {
                LoadByteCode(OnLoadScriptCallback);
            }
        }
    }