AssetBundleGraph.FileUtility.GetPathWithProjectPath C# (CSharp) Method

GetPathWithProjectPath() public static method

public static GetPathWithProjectPath ( string pathUnderProjectFolder ) : string
pathUnderProjectFolder string
return string
        public static string GetPathWithProjectPath(string pathUnderProjectFolder)
        {
            var assetPath = Application.dataPath;
            var projectPath = Directory.GetParent(assetPath).ToString();
            return FileUtility.PathCombine(projectPath, pathUnderProjectFolder);
        }

Usage Example

 public void Setup(BuildTarget target,
                   NodeData node,
                   IEnumerable <PerformGraph.AssetGroups> incoming,
                   IEnumerable <ConnectionData> connectionsToOutput,
                   PerformGraph.Output Output)
 {
     ValidateExportPath(
         node.ExporterExportPath[target],
         FileUtility.GetPathWithProjectPath(node.ExporterExportPath[target]),
         () => {
         throw new NodeException(node.Name + ":Export Path is empty.", node.Id);
     },
         () => {
         if (node.ExporterExportOption[target] == (int)ExporterExportOption.ErrorIfNoExportDirectoryFound)
         {
             throw new NodeException(node.Name + ":Directory set to Export Path does not exist. Path:" + node.ExporterExportPath[target], node.Id);
         }
     }
         );
 }
All Usage Examples Of AssetBundleGraph.FileUtility::GetPathWithProjectPath