Documentation ¶
Index ¶
- Constants
- Variables
- func FoundPackagesToSlashRelPaths(foundPackages []*FoundPackage) []typedpath.SlashPath
- func IsHiddenBasename(baseName typedpath.BaseName) bool
- func IsMeta(path typedpath.SlashPath) bool
- func IsSpecialFolder(baseName typedpath.BaseName) 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 ¶
const AssetsDirBaseName typedpath.BaseName = "Assets"
const LocalPkgPrefix = "file:"
const LocalPkgPrefixLen = len(LocalPkgPrefix)
const MetaSuffix string = ".meta"
const PackagesDirname typedpath.BaseName = "Packages"
Variables ¶
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
func IsSpecialFolder ¶
IsSpecialFolder return whether the specified basename is treated as "special" by Unity. Unity requires .meta files for only the special folder itself, and not requires .meta files for contents of the special folder. https://docs.unity3d.com/ja/2023.1/Manual/SpecialFolders.html https://forum.unity.com/threads/loadable-plugin-directory-import-behaviour-change-androidlib-bundle-framework-and-plugin.1381113/
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