Class UnityPathUtils
Class UnityPathUtils.
Namespace: UnityEngine.Industrial.Configuring.Utils
Syntax
public static class UnityPathUtils
Fields
k_UnityDirectorySeparator
The k unity directory separator
Declaration
public const string k_UnityDirectorySeparator = "/"
Field Value
Type | Description |
---|---|
String |
Methods
CleanPath(String)
Cleans the path.
Declaration
public static string CleanPath(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path. |
Returns
Type | Description |
---|---|
String | System.String. |
Combine(String[])
Combines the specified parts.
Declaration
public static string Combine(params string[] parts)
Parameters
Type | Name | Description |
---|---|---|
String[] | parts | The parts. |
Returns
Type | Description |
---|---|
String | System.String. |
DiskPathToProjectRelativePath(String)
Disks the path to project relative path.
Declaration
public static string DiskPathToProjectRelativePath(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path. |
Returns
Type | Description |
---|---|
String | System.String. |
FormatToProjectRelativePath(IEnumerable<String>)
Formats to project relative path.
Declaration
public static IEnumerable<string> FormatToProjectRelativePath(IEnumerable<string> paths)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | paths | The paths. |
Returns
Type | Description |
---|---|
IEnumerable<String> | IEnumerable<System.String>. |
GetPathPartsLength(String)
Gets the length of the path parts.
Declaration
public static int GetPathPartsLength(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path. |
Returns
Type | Description |
---|---|
Int32 | System.Int32. |
GetRelativePathParts(String, Boolean, Boolean, String)
Gets the relative path parts.
Declaration
public static string[] GetRelativePathParts(string path, bool removeRootFolder = false, bool removeFileName = false, string filename = null)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path. |
Boolean | removeRootFolder | if set to |
Boolean | removeFileName | if set to |
String | filename | The filename. |
Returns
Type | Description |
---|---|
String[] | System.String[]. |
GetRootFolder(String)
Gets the root folder.
Declaration
public static string GetRootFolder(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The path. |
Returns
Type | Description |
---|---|
String | System.String. |
IsAssetFileExist(String)
Determines whether [is asset file exist] [the specified asset file path].
Declaration
public static bool IsAssetFileExist(string assetFilePath)
Parameters
Type | Name | Description |
---|---|---|
String | assetFilePath | The asset file path. |
Returns
Type | Description |
---|---|
Boolean |
|