public string[] GetSceneInfomation(bool validate)
{
string[] result = new string[6];
string sceneName = SceneManager.GetActiveScene().name;
if (String.IsNullOrEmpty(exportationOptions.DefaultBuildPath))
{
exportationOptions.DefaultBuildPath = "Build";
}
string buildPath = Tools.FormatSafePath(Path.Combine(exportationOptions.DefaultProjectFolder, exportationOptions.DefaultBuildPath));
if (validate && !Directory.Exists(buildPath))
{
Directory.CreateDirectory(buildPath);
}
if (String.IsNullOrEmpty(exportationOptions.DefaultScenePath))
{
exportationOptions.DefaultScenePath = "Scenes";
}
string scenePath = Tools.FormatSafePath(Path.Combine(exportationOptions.DefaultProjectFolder, exportationOptions.DefaultScenePath));
if (validate && !Directory.Exists(scenePath))
{
Directory.CreateDirectory(scenePath);
}
if (String.IsNullOrEmpty(exportationOptions.DefaultScriptPath))
{
exportationOptions.DefaultScriptPath = "Scripts";
}
string scriptPath = Tools.FormatSafePath(Path.Combine(exportationOptions.DefaultProjectFolder, exportationOptions.DefaultScriptPath));
if (validate && !Directory.Exists(scriptPath))
{
Directory.CreateDirectory(scriptPath);
}
if (String.IsNullOrEmpty(exportationOptions.DefaultIndexPage))
{
exportationOptions.DefaultIndexPage = "Index.html";
}
if (String.IsNullOrEmpty(exportationOptions.DefaultTypeSriptPath))
{
exportationOptions.DefaultTypeSriptPath = Tools.GetDefaultTypeScriptPath();
}
if (String.IsNullOrEmpty(exportationOptions.DefaultNodeRuntimePath))
{
exportationOptions.DefaultNodeRuntimePath = Tools.GetDefaultNodeRuntimePath();
}
if (exportationOptions.DefaultServerPort < 1024)
{
exportationOptions.DefaultServerPort = ExporterWindow.DefaultPort;
}
string projectName = Application.productName;
if (String.IsNullOrEmpty(projectName))
{
projectName = "Application";
}
string outputFile = Tools.FormatSafePath(Path.Combine(scenePath, sceneName.Replace(" ", "") + ".babylon"));
string projectScript = Tools.FormatSafePath(Path.Combine(scenePath, projectName.Replace(" ", "") + ".babylon"));
result[0] = sceneName;
result[1] = scenePath;
result[2] = buildPath;
result[3] = outputFile;
result[4] = projectScript;
return result;
}