docs.unity3d.com
    目次を表示する/隠す

    Class FileNameGenerator

    A class that provides a way to generate names of output files, with support for wildcards.

    Inheritance
    Object
    FileNameGenerator
    Namespace: UnityEditor.Recorder
    Syntax
    public class FileNameGenerator : object

    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

    Specifies whether the generated file is saved in the Assets folder or not.

    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.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)