Documentation ¶
Overview ¶
Package unreal holds common functionality for querying an unreal project, searching for things like modules, files, etc.
Index ¶
Constants ¶
const (
Platform_Windows = "Win64"
)
const (
UnrealBuildFileExtension = ".build.cs"
)
Variables ¶
This section is empty.
Functions ¶
func IsUnrealBuildFile ¶
IsUnrealBuildFile returns whether the path points to an unreal build file. These are normally C# files that end with the .Build.cs extension. We search for a common regex pattern than we should find. Returns the defined module name when found.
Types ¶
type File ¶
File represents a file within an Unreal project.
func (*File) ModTime ¶
ModTime returns the latest modification time of the file. If the file does not exist, returns the earliest time possible.
func (*File) ModulePath ¶ added in v0.1.1
ModulePath is the path of the file _within_ the module (basically stripping the module path).
type Module ¶
type Module struct { Name string BaseDir string BuildFile string Files []string // contains filtered or unexported fields }
Module represents an unreal module.
func (*Module) Contains ¶
Contains returns whether a particular path is within this module. Assumes that the entry |path| has been cleaned with filepath.Clean
func (*Module) LoadUHTFiles ¶ added in v0.1.3
LoadUHTFiles makes this module load the UHT files associated with this module for this platform. |reload| forces the previous cached results to be overwritten. Otherwise the previous results will be returned.
type Platform ¶
type Platform string
func NewUnrealPlatform ¶
NewUnrealPlatform attempts to unify the unreal platform from identifiers that might come from the outside.
type Project ¶
Project represents an indexed Unreal project.
func (*Project) SearchForFilesByExtension ¶
func (p *Project) SearchForFilesByExtension(ctx context.Context, platform Platform, extensions []string) ([]string, error)
SearchForFilesByExtension goes over all the loaded modules in parallel and finds all the found files with that extension. Useful for things like finding all gochart files. |extensions| should match a string.HasSuffix over the filepath.Base.