docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method MakeRelativePath

    MakeRelativePath(string, string)

    Creates a relative path from one file or folder to another.

    Declaration
    public static string MakeRelativePath(string anchorPath, string pathToMakeRelative)
    Parameters
    Type Name Description
    string anchorPath

    The path we want to be relative to.

    string pathToMakeRelative

    The path we want to make relative.

    Returns
    Type Description
    string

    The resulting relative path.

    Exceptions
    Type Condition
    ArgumentNullException

    throw if either input paths are null.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)