docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method WriteFile

    WriteFile(string, string, FileRegistry)

    Utility method to write a file. The directory will be created if it does not exist.

    Declaration
    protected static bool WriteFile(string path, string content, FileRegistry registry)
    Parameters
    Type Name Description
    string path

    The path of the file to write.

    string content

    The content of the file.

    FileRegistry registry

    The file registry used to track all produced artifacts.

    Returns
    Type Description
    bool

    True if the file was written.

    In This Article
    • WriteFile(string, string, FileRegistry)
    Back to top
    Copyright © 2025 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)