Documentation ¶
Index ¶
- Constants
- Variables
- func FoundPackagesToSlashRelPaths(foundPackages []*FoundPackage) []typedpath.SlashPath
- func IsHiddenBasename(baseName typedpath.BaseName) bool
- func IsMeta(path typedpath.SlashPath) bool
- func MetaPath(path typedpath.SlashPath) typedpath.SlashPath
- func TrimMetaFromRaw(path typedpath.RawPath) typedpath.RawPath
- func TrimMetaFromSlash(path typedpath.SlashPath) typedpath.SlashPath
- type FindPackages
- type FoundPackage
- type ManifestJson
- type MetaNecessity
Constants ¶
View Source
const AssetsDirBaseName typedpath.BaseName = "Assets"
View Source
const LocalPkgPrefix = "file:"
View Source
const LocalPkgPrefixLen = len(LocalPkgPrefix)
View Source
const MetaSuffix string = ".meta"
View Source
const PackagesDirname typedpath.BaseName = "Packages"
Variables ¶
View Source
var ManifestBasename typedpath.BaseName = "manifest.json"
Functions ¶
func FoundPackagesToSlashRelPaths ¶
func FoundPackagesToSlashRelPaths(foundPackages []*FoundPackage) []typedpath.SlashPath
func IsHiddenBasename ¶
IsHiddenBasename return whether the specified basename is treated as "hidden" by Unity. > During the import process, Unity completely ignores the following files and folders in the Assets folder (or a sub-folder within it): > > Hidden folders. > Files and folders which start with ‘.’. > Files and folders which end with ‘~’. > Files and folders named cvs. > Files with the extension .tmp. https://docs.unity3d.com/2020.2/Documentation/Manual/SpecialFolders.html
Types ¶
type FindPackages ¶
type FindPackages func(projRoot typedpath.RawPath) ([]*FoundPackage, error)
func NewFindPackages ¶
func NewFindPackages(logger logging.Logger) FindPackages
NewFindPackages returns the dependencies field of manifest.json. For example,
Input: "dependencies": { ... "com.my.pkg": "1.0.0" "com.my.local.pkg": "file:../MyLocalPkg/com.my.local.pkg" "com.my.another.local.pkg": "file:../MyLocalPkg/com.my.another.local.pkg" ... } Output: []string{"Packages/com.my.pkg", "MyLocalPkg/com.my.local.pkg", "MyLocalPkg/com.my.another.local.pkg"}
type FoundPackage ¶
type ManifestJson ¶
func ReadManifest ¶
func ReadManifest(path typedpath.RawPath) (*ManifestJson, error)
type MetaNecessity ¶
func ConstMetaNecessity ¶
func ConstMetaNecessity(result bool) MetaNecessity
func NewMetaNecessityInUnityProject ¶
func NewMetaNecessityInUnityProject(pkgPaths []typedpath.SlashPath) MetaNecessity
func NewMetaNecessityInUnityProjectSubDir ¶
func NewMetaNecessityInUnityProjectSubDir() MetaNecessity
Click to show internal directories.
Click to hide internal directories.