ProjectPathWithSlash() public static method

public static ProjectPathWithSlash ( ) : string
return string
示例#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();
        }
        CollectResult(Dictionary <string, Dictionary <string, List <Asset> > > sourceConId_Group_Throughput)
        {
            var result = new Dictionary <string, Dictionary <string, List <DepreacatedThroughputAsset> > >();

            foreach (var connectionId in sourceConId_Group_Throughput.Keys)
            {
                var connectionGroupDict = sourceConId_Group_Throughput[connectionId];

                var newConnectionGroupDict = new Dictionary <string, List <DepreacatedThroughputAsset> >();
                foreach (var groupKey in connectionGroupDict.Keys)
                {
                    var connectionThroughputList = connectionGroupDict[groupKey];

                    var sourcePathList = new List <DepreacatedThroughputAsset>();
                    foreach (var assetData in connectionThroughputList)
                    {
                        var bundled = assetData.isBundled;

                        if (!string.IsNullOrEmpty(assetData.importFrom))
                        {
                            sourcePathList.Add(new DepreacatedThroughputAsset(assetData.importFrom, bundled));
                            continue;
                        }

                        if (!string.IsNullOrEmpty(assetData.absoluteAssetPath))
                        {
                            var relativeAbsolutePath = assetData.absoluteAssetPath.Replace(FileUtility.ProjectPathWithSlash(), string.Empty);
                            sourcePathList.Add(new DepreacatedThroughputAsset(relativeAbsolutePath, bundled));
                            continue;
                        }

                        if (!string.IsNullOrEmpty(assetData.exportTo))
                        {
                            sourcePathList.Add(new DepreacatedThroughputAsset(assetData.exportTo, bundled));
                            continue;
                        }
                    }
                    newConnectionGroupDict[groupKey] = sourcePathList;
                }
                result[connectionId] = newConnectionGroupDict;
            }
            return(result);
        }