Search Results for

    Show / Hide Table of Contents

    Class EditorUtilities

    Helper functions for the editor.

    Inheritance
    EditorUtilities
    Inherited Members
    EditorUtilities
    Assembly: FlaxEngine.dll
    File: Editor/Utilities/EditorUtilities.h
    Syntax
    public class EditorUtilities

    Methods

    CopyDirectoryIfNewer(const StringView& dst, const StringView& src, bool withSubDirectories=true)

    Declaration
    public static bool CopyDirectoryIfNewer(const StringView& dst, const StringView& src, bool withSubDirectories=true)
    Parameters
    StringView dst

    StringView src

    bool withSubDirectories

    Returns
    bool

    CopyFileIfNewer(const StringView& dst, const StringView& src)

    Declaration
    public static bool CopyFileIfNewer(const StringView& dst, const StringView& src)
    Parameters
    StringView dst

    StringView src

    Returns
    bool

    ExportApplicationImage(const Guid& iconId, int32 width, int32 height, PixelFormat format, const String& path, ApplicationImageType type=ApplicationImageType::Icon)

    Declaration
    public static bool ExportApplicationImage(const Guid& iconId, int32 width, int32 height, PixelFormat format, const String& path, ApplicationImageType type=ApplicationImageType::Icon)
    Parameters
    Guid iconId

    int32 width

    int32 height

    PixelFormat format

    String path

    ApplicationImageType type

    Returns
    bool

    ExportApplicationImage(const SoftObjectReference<T>& icon, int32 width, int32 height, PixelFormat format, const String& path, ApplicationImageType type=ApplicationImageType::Icon)

    Declaration
    public static bool ExportApplicationImage(const SoftObjectReference<T>& icon, int32 width, int32 height, PixelFormat format, const String& path, ApplicationImageType type=ApplicationImageType::Icon)
    Parameters
    SoftObjectReference<T> icon

    int32 width

    int32 height

    PixelFormat format

    String path

    ApplicationImageType type

    Returns
    bool

    Type Parameters
    typename T

    ExportApplicationImage(const TextureData& icon, int32 width, int32 height, PixelFormat format, const String& path)

    Declaration
    public static bool ExportApplicationImage(const TextureData& icon, int32 width, int32 height, PixelFormat format, const String& path)
    Parameters
    TextureData icon

    int32 width

    int32 height

    PixelFormat format

    String path

    Returns
    bool

    FindWDKBin(String& outputWdkBinPath)

    Declaration
    public static bool FindWDKBin(String& outputWdkBinPath)
    Parameters
    String outputWdkBinPath

    Returns
    bool

    FormatAppPackageName(String& packageName)

    Declaration
    public static bool FormatAppPackageName(String& packageName)
    Parameters
    String packageName

    Returns
    bool

    GenerateCertificate(const String& name, const String& outputPfxFilePath)

    Declaration
    public static bool GenerateCertificate(const String& name, const String& outputPfxFilePath)
    Parameters
    String name

    String outputPfxFilePath

    Returns
    bool

    GenerateCertificate(const String& name, const String& outputPfxFilePath, const String& outputCerFilePath, const String& outputPvkFilePath)

    Declaration
    public static bool GenerateCertificate(const String& name, const String& outputPfxFilePath, const String& outputCerFilePath, const String& outputPvkFilePath)
    Parameters
    String name

    String outputPfxFilePath

    String outputCerFilePath

    String outputPvkFilePath

    Returns
    bool

    GetApplicationImage(const Guid& imageId, TextureData& imageData, ApplicationImageType type=ApplicationImageType::Icon)

    Declaration
    public static bool GetApplicationImage(const Guid& imageId, TextureData& imageData, ApplicationImageType type=ApplicationImageType::Icon)
    Parameters
    Guid imageId

    TextureData imageData

    ApplicationImageType type

    Returns
    bool

    GetApplicationImage(const SoftObjectReference<T>& image, TextureData& imageData, ApplicationImageType type=ApplicationImageType::Icon)

    Declaration
    public static bool GetApplicationImage(const SoftObjectReference<T>& image, TextureData& imageData, ApplicationImageType type=ApplicationImageType::Icon)
    Parameters
    SoftObjectReference<T> image

    TextureData imageData

    ApplicationImageType type

    Returns
    bool

    Type Parameters
    typename T

    GetOutputName()

    Declaration
    public static String GetOutputName()
    Returns
    String

    GetTexture(const Guid& textureId, TextureData& textureData)

    Declaration
    public static bool GetTexture(const Guid& textureId, TextureData& textureData)
    Parameters
    Guid textureId

    TextureData textureData

    Returns
    bool

    IsInvalidPathChar(Char c)

    Determines whether the specified path character is invalid.

    Declaration
    public static bool IsInvalidPathChar(Char c)
    Parameters
    Char c

    The path character.

    Returns
    bool

    true if the given character cannot be used as a path because it is illegal character; otherwise, false.

    ReplaceInFile(const StringView& file, const Dictionary<String, String, HeapAllocation>& replaceMap)

    Declaration
    public static bool ReplaceInFile(const StringView& file, const Dictionary<String, String, HeapAllocation>& replaceMap)
    Parameters
    StringView file

    Dictionary<String, String, HeapAllocation> replaceMap

    Returns
    bool

    ReplaceInFile(const StringView& file, const StringView& findWhat, const StringView& replaceWith)

    Replaces the given text with other one in the file.

    Declaration
    public static bool ReplaceInFile(const StringView& file, const StringView& findWhat, const StringView& replaceWith)
    Parameters
    StringView file

    The file to process.

    StringView findWhat

    The text to replace.

    StringView replaceWith

    The value to replace to.

    Returns
    bool

    True if failed, otherwise false.

    ReplaceInFiles(const String& folderPath, const Char* searchPattern, DirectorySearchOption searchOption, const String& findWhat, const String& replaceWith)

    Replaces the given text with other one in the files.

    Declaration
    public static bool ReplaceInFiles(const String& folderPath, const Char* searchPattern, DirectorySearchOption searchOption, const String& findWhat, const String& replaceWith)
    Parameters
    String folderPath

    The relative or absolute path to the directory to search.

    Char searchPattern

    The search string to match against the names of files in folderPath . This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions.

    DirectorySearchOption searchOption

    One of the enumeration values that specifies whether the search operation should include all subdirectories or only the current directory.

    String findWhat

    The text to replace.

    String replaceWith

    The value to replace to.

    Returns
    bool

    True if failed, otherwise false.

    ValidatePathChars(String& filename, char invalidCharReplacement=' ')

    Validates path characters and replaces any incorrect ones.

    Declaration
    public static void ValidatePathChars(String& filename, char invalidCharReplacement=' ')
    Parameters
    String filename

    The input and output filename string to process.

    char invalidCharReplacement

    The character to use for replacement for any invalid characters in the path. Use '0' to remove them.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat