NG.AssertDebug.AssertDebugConfig.GetLogFilePath C# (CSharp) Method

GetLogFilePath() public method

Returns the log file path. When running from the editor this will be the "Unity project folder"/logs. When running a standalone build this will be MyDocuments/CompanyName/ApplicationName/logs
public GetLogFilePath ( ) : string
return string
        public string GetLogFilePath()
        {
            string path = Application.dataPath;
            #if !UNITY_EDITOR
            path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + "/" + Application.companyName + "/" + Application.productName + "/logs";
            #else
            DirectoryInfo parentDir = Directory.GetParent(Application.dataPath);
            path = parentDir.FullName + "/logs";
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            #endif
            return path;
        }