Ejemplo n.º 1
0
    public void BeginExport(string szPath)
    {
        s_pIns         = this;
        m_szExportPath = szPath;

        PushNameSapce("System");
        PushNameSapce("System.Collections.Generic");
        PushNameSapce("System.Text");
        PushNameSapce("UnityEngine");
        PushNameSapce("UnityObject = UnityEngine.Object");

        PushGetTypeWrap(typeof(byte[]));
        PushGetTypeWrap(typeof(int[]));

        PushGetTypeWrap(typeof(List <byte>));
        PushGetTypeWrap(typeof(List <int>));

        PushGetTypeWrap(typeof(List <Vector2>));
        PushGetTypeWrap(typeof(List <Vector3>));
        PushGetTypeWrap(typeof(List <Vector4>));

        PushReturnTypeWrap(typeof(byte []));
        PushReturnTypeWrap(typeof(List <byte>));

        // 手动在这里添加扩展的类型
    }
Ejemplo n.º 2
0
 // 功能:开始导出
 public void BeginExport(string szExportPath)
 {
     m_szExportPath = szExportPath;
     if (string.IsNullOrEmpty(m_szExportPath))
     {
         //m_szExportPath = Application.dataPath;
         //m_szExportPath = m_szExportPath.Substring(0, m_szExportPath.Length - 6) + "FCWrap/";
         m_szExportPath = Application.dataPath + "/FCWrap/";
     }
     m_szFCScriptPath = Application.dataPath;
     m_szFCScriptPath = m_szFCScriptPath.Substring(0, m_szFCScriptPath.Length - 6) + "Script/inport/";
     DeletePath(m_szExportPath);
     DeletePath(m_szFCScriptPath);
     Directory.CreateDirectory(m_szExportPath);
     Directory.CreateDirectory(m_szFCScriptPath);
     // 清除该目录下的文件
     m_szTempBuilder = new StringBuilder(1024 * 1024 * 1);
     m_export        = new FCClassExport();
     m_templateWrap  = new FCTemplateWrap();
     m_templateWrap.BeginExport(m_szExportPath);
     m_deleteWrap = new FCDelegateWrap();
     m_deleteWrap.BeginExport(m_szExportPath);
 }