Documentation ¶
Index ¶
- func IsVersionNotFound(err error) bool
- type InstallInfo
- func GetInstallFromPath(path string) (InstallInfo, error)
- func GetInstallFromVersion(version VersionData, searchPaths ...string) (InstallInfo, error)
- func GetInstalls(searchPaths ...string) ([]InstallInfo, error)
- func InstallFromArchive(ver VersionData, hubPath string, modules, searchPaths []string) (InstallInfo, error)
- type VersionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsVersionNotFound ¶
IsVersionNotFound used for checking an error to confirm of it is a version not found error
Types ¶
type InstallInfo ¶
type InstallInfo struct { Path string Version VersionData }
InstallInfo represents a runnable unity install
func GetInstallFromPath ¶
func GetInstallFromPath(path string) (InstallInfo, error)
GetInstallFromPath returns an InstallInfo for a given path
func GetInstallFromVersion ¶
func GetInstallFromVersion(version VersionData, searchPaths ...string) (InstallInfo, error)
GetInstallFromVersion tries to find the appropriate Unity install for a given version
func GetInstalls ¶
func GetInstalls(searchPaths ...string) ([]InstallInfo, error)
GetInstalls lists all found Unity installs for a given set of search paths
func InstallFromArchive ¶
func InstallFromArchive(ver VersionData, hubPath string, modules, searchPaths []string) (InstallInfo, error)
func (*InstallInfo) Run ¶
func (info *InstallInfo) Run(project string) error
Run launches this Unity installs with a given project
func (*InstallInfo) RunWithTarget ¶
func (info *InstallInfo) RunWithTarget(project, target string) error
RunWithTarget launches this unity install with the given project and target
func (*InstallInfo) String ¶
func (info *InstallInfo) String() string
String prints version and path for this InstallInfo
type VersionData ¶
type VersionData struct { Major int Minor int Update int VerType string Patch int RevisionHash string }
VersionData represents a Unity version in a comparable format
func GetAllVersions ¶
func GetAllVersions() ([]VersionData, error)
func GetVersionFromProject ¶
func GetVersionFromProject(projectPath string) (VersionData, error)
GetVersionFromProject finds the Unity version used in a given project path
func SearchArchive ¶
func SearchArchive(partialVersion string) ([]VersionData, error)
func VersionFromString ¶
func VersionFromString(input string) (VersionData, error)
VersionFromString parses a string and returns a VersionData
func (VersionData) Compare ¶
func (v VersionData) Compare(other VersionData) int
Compare comparison function for versions, ignores RevisionHash
func (VersionData) HasRevisionHash ¶
func (v VersionData) HasRevisionHash() bool
func (VersionData) String ¶
func (v VersionData) String() string
String outputs version in string format "major.minor.update verType patch"