コード例 #1
0
#pragma warning restore 649

        /// <inheritdoc />
        public ReturnCode Run()
        {
            if (m_Parameters.ScriptInfo != null)
            {
                BuildCacheUtility.SetTypeDB(m_Parameters.ScriptInfo);
                return(ReturnCode.SuccessNotRun);
            }

            // We need to ensure the directory is empty so prior results or other artifacts in this directory do not influence the build result
            if (Directory.Exists(m_Parameters.ScriptOutputFolder))
            {
                Directory.Delete(m_Parameters.ScriptOutputFolder, true);
                Directory.CreateDirectory(m_Parameters.ScriptOutputFolder);
            }

            m_Results.ScriptResults = PlayerBuildInterface.CompilePlayerScripts(m_Parameters.GetScriptCompilationSettings(), m_Parameters.ScriptOutputFolder);
            m_Parameters.ScriptInfo = m_Results.ScriptResults.typeDB;
            BuildCacheUtility.SetTypeDB(m_Parameters.ScriptInfo);

            if (m_Results.ScriptResults.assemblies.IsNullOrEmpty() && m_Results.ScriptResults.typeDB == null)
            {
                return(ReturnCode.Error);
            }
            return(ReturnCode.Success);
        }
コード例 #2
0
ファイル: BuildPlayerScripts.cs プロジェクト: Habi-Thapa/csv
#pragma warning restore 649

        /// <inheritdoc />
        public ReturnCode Run()
        {
            if (m_Parameters.ScriptInfo != null)
            {
                BuildCacheUtility.SetTypeDB(m_Parameters.ScriptInfo);
                return(ReturnCode.SuccessNotRun);
            }

            m_Results.ScriptResults = PlayerBuildInterface.CompilePlayerScripts(m_Parameters.GetScriptCompilationSettings(), m_Parameters.ScriptOutputFolder);
            m_Parameters.ScriptInfo = m_Results.ScriptResults.typeDB;
            BuildCacheUtility.SetTypeDB(m_Parameters.ScriptInfo);

            if (m_Results.ScriptResults.assemblies.IsNullOrEmpty() && m_Results.ScriptResults.typeDB == null)
            {
                return(ReturnCode.Error);
            }
            return(ReturnCode.Success);
        }