Class PathUtility | Anime Toolbox | 0.2.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class PathUtility

    A utility class for executing path-related operations.

    Inheritance
    Object
    PathUtility
    Namespace: Unity.AnimeToolbox
    Syntax
    public static class PathUtility

    Methods

    GetDirectoryName(String, Int32)

    Get the directory name of the path n-levels up Ex: n=1. Assets/Scripts/Foo.cs => Assets/Scripts n=2. Assets/Scripts/Foo.cs => Assets

    Declaration
    public static string GetDirectoryName(string path, int n = 1)
    Parameters
    Type Name Description
    String path

    the base path

    Int32 n

    how many levels up

    Returns
    Type Description
    String

    the directory name

    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