unity

package
v0.0.0-...-d682fd2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

func IsHiddenBasename(baseName typedpath.BaseName) bool

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 IsMeta

func IsMeta(path typedpath.SlashPath) bool

func IsSpecialFolder

func IsSpecialFolder(baseName typedpath.BaseName) bool

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/

func MetaPath

func MetaPath(path typedpath.SlashPath) typedpath.SlashPath

func TrimMetaFromRaw

func TrimMetaFromRaw(path typedpath.RawPath) typedpath.RawPath

func TrimMetaFromSlash

func TrimMetaFromSlash(path typedpath.SlashPath) typedpath.SlashPath

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 FoundPackage struct {
	FilePrefix bool
	AbsPath    typedpath.RawPath
	RelPath    typedpath.RawPath
}

type ManifestJson

type ManifestJson struct {
	Dependencies map[string]string `json:"dependencies"`
}

func ReadManifest

func ReadManifest(path typedpath.RawPath) (*ManifestJson, error)

type MetaNecessity

type MetaNecessity func(targetPath typedpath.SlashPath) bool

func ConstMetaNecessity

func ConstMetaNecessity(result bool) MetaNecessity

func NewMetaNecessityInUnityProject

func NewMetaNecessityInUnityProject(pkgPaths []typedpath.SlashPath) MetaNecessity

func NewMetaNecessityInUnityProjectSubDir

func NewMetaNecessityInUnityProjectSubDir() MetaNecessity

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL