docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BaseLogger

    Abstract base class that manages output path construction and sequenced file naming for loggers and screen-capture helpers.

    Inheritance
    object
    BaseLogger
    Logger
    ScreenCapture
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.SimulationPro
    Assembly: Unity.SimulationPro.Capture.dll
    Syntax
    public abstract class BaseLogger

    Fields

    _extension

    The file extension (including the leading dot) appended to output file names.

    Declaration
    protected string _extension
    Field Value
    Type Description
    string

    _loggerSuffixOption

    The suffix strategy used when generating output file names.

    Declaration
    protected LoggerSuffixOption _loggerSuffixOption
    Field Value
    Type Description
    LoggerSuffixOption

    _name

    The base file name used when generating output file paths.

    Declaration
    protected string _name
    Field Value
    Type Description
    string

    _sequence

    Monotonically incrementing sequence number used for unique file-name suffixes.

    Declaration
    protected int _sequence
    Field Value
    Type Description
    int

    _suffixAction

    Optional delegate that returns a custom suffix string to append to output file names.

    Declaration
    protected Func<string> _suffixAction
    Field Value
    Type Description
    Func<string>

    _type

    The sub-directory type name used when constructing the output path (e.g. "Logs", "ScreenCapture").

    Declaration
    protected string _type
    Field Value
    Type Description
    string

    _userPath

    Optional user-specified base directory for output files. When empty, the default storage path is used.

    Declaration
    protected string _userPath
    Field Value
    Type Description
    string

    Methods

    GetPath()

    Builds and returns the full output file path for the next file, using the configured name, suffix, and extension.

    Declaration
    public string GetPath()
    Returns
    Type Description
    string

    The absolute file path for the next output file.

    SetOutputPath(string, string, string, string, Func<string>, LoggerSuffixOption)

    Configures the output directory and file-naming parameters for this logger.

    Declaration
    public void SetOutputPath(string type, string name, string extension, string userPath = "", Func<string> suffixAppend = null, LoggerSuffixOption option = LoggerSuffixOption.SEQ_NO)
    Parameters
    Type Name Description
    string type

    The sub-directory name identifying the data category (e.g. "Logs").

    string name

    The base file name for output files.

    string extension

    The file extension including the leading dot (e.g. ".txt").

    string userPath

    Optional user-specified base path. When empty, uses the default storage path.

    Func<string> suffixAppend

    Optional delegate returning a custom suffix string for file names.

    LoggerSuffixOption option

    The suffix generation strategy to use.

    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)