Class FileNameGenerator | Unity Recorder | 2.1.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class FileNameGenerator

    Inheritance
    Object
    FileNameGenerator
    Namespace: UnityEditor.Recorder
    Syntax
    [Serializable]
    public class FileNameGenerator

    Properties

    FileName

    Stores the default set of tags that make up the output file name.

    Declaration
    public string FileName { get; set; }
    Property Value
    Type Description
    String

    ForceAssetsFolder

    Use this property to ensure that the generated file is saved in the Assets folder.

    Declaration
    public bool ForceAssetsFolder { get; set; }
    Property Value
    Type Description
    Boolean

    Leaf

    Indicates the filename part of the full path (without the extension).

    Declaration
    public string Leaf { get; set; }
    Property Value
    Type Description
    String

    Root

    Indicates the root location the paths are relative to.

    Declaration
    public OutputPath.Root Root { get; set; }
    Property Value
    Type Description
    OutputPath.Root

    Methods

    AddWildcard(String, Func<RecordingSession, String>)

    Adds a tag and the corresponding callback to resolve it.

    Declaration
    public void AddWildcard(string tag, Func<RecordingSession, string> resolver)
    Parameters
    Type Name Description
    String tag

    The tag string.

    Func<RecordingSession, String> resolver

    Callback invoked to replace the tag with custom content.

    BuildAbsolutePath(RecordingSession)

    Builds an absolute path from the list of configured output file tags replaced by the RecordingSession.

    Declaration
    public string BuildAbsolutePath(RecordingSession session)
    Parameters
    Type Name Description
    RecordingSession session

    The Recorder session used to replace the tags.

    Returns
    Type Description
    String

    An absolute path towards a file.

    CreateDirectory(RecordingSession)

    Creates the directory structure containing the output file from the list of tags and a RecordingSession.

    Declaration
    public void CreateDirectory(RecordingSession session)
    Parameters
    Type Name Description
    RecordingSession session

    The Recorder session.

    SanitizePath(String)

    Makes the output file path compliant with any OS (replacing any "&quot; by "/").

    Declaration
    public static string SanitizePath(string fullPath)
    Parameters
    Type Name Description
    String fullPath
    Returns
    Type Description
    String

    The full path with slashes "/" as file separators.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023