docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method EnsureTrailingSlash

    EnsureTrailingSlash(string)

    Ensures a path ends with a trailing forward slash.

    Declaration
    public static string EnsureTrailingSlash(string path)
    Parameters
    Type Name Description
    string path

    The path to check.

    Returns
    Type Description
    string

    The path with a trailing slash appended if it was missing.

    In This Article
    Back to top
    Copyright © 2026 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)