AssetBundleGraph.FileUtility.ProjectPathWithSlash C# (CSharp) Method

ProjectPathWithSlash() public static method

public static ProjectPathWithSlash ( ) : string
return string
        public static string ProjectPathWithSlash()
        {
            var assetPath = Application.dataPath;
            return Directory.GetParent(assetPath).ToString() + AssetBundleGraphSettings.UNITY_FOLDER_SEPARATOR;
        }

Usage Example

Example #1
0
        private static void CreateCUITool()
        {
            var appCmd  = string.Format("{0}{1}", EditorApplication.applicationPath, (Application.platform == RuntimePlatform.WindowsEditor)? "" : "/Contents/MacOS/Unity");
            var argPass = (Application.platform == RuntimePlatform.WindowsEditor)? "%1 %2 %3 %4 %5 %6 %7 %8 %9" : "$*";
            var cmd     = string.Format(kCommandStr, appCmd, FileUtility.ProjectPathWithSlash(), kCommandMethod, argPass);
            var ext     = (Application.platform == RuntimePlatform.WindowsEditor)? "bat" : "sh";
            var cmdFile = string.Format(kCommandName, ext);

            var destinationPath = FileUtility.PathCombine(AssetBundleGraphSettings.CUISPACE_PATH, cmdFile);

            Directory.CreateDirectory(AssetBundleGraphSettings.CUISPACE_PATH);
            File.WriteAllText(destinationPath, cmd);

            AssetDatabase.Refresh();
        }
All Usage Examples Of AssetBundleGraph.FileUtility::ProjectPathWithSlash