docs.unity3d.com
    Show / Hide Table of Contents

    Class UnityPathUtils

    Class UnityPathUtils.

    Inheritance
    Object
    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 true [remove root folder].

    Boolean removeFileName

    if set to true [remove file name].

    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

    true if [is asset file exist] [the specified asset file path]; otherwise, false.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023