docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method RemoveExtension

    RemoveExtension(string)

    Removes the extension from a file name.

    Declaration
    public static string RemoveExtension(this string fileName)
    Parameters
    Type Name Description
    string fileName

    File name to process.

    Returns
    Type Description
    string

    The file name without its extension.

    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)