C# Class Google.VersionHandler.FileMetadata

Derives metadata from an asset filename.
Afficher le fichier Open project: googlesamples/unity-jar-resolver

Méthodes publiques

Свойство Type Description
ASSET_LABEL string
BUILD_TARGET_NAME_TO_ENUM BuildTarget>.Dictionary
filename string
filenameCanonical string
isManifest bool
targets string[]
versionString string

Méthodes publiques

Méthode Description
CalculateVersion ( ) : long

Get a numeric version number. Each component is multiplied by VERSION_COMPONENT_MULTIPLIER^(MAX_VERSION_COMPONENTS - (component_index + 1)) and accumulated in the returned value. If the version string contains more than MAX_VERSION_COMPONENTS the remaining components are ignored.

CalculateVersion ( string versionString ) : long

Get a numeric version number. Each component is multiplied by VERSION_COMPONENT_MULTIPLIER^(MAX_VERSION_COMPONENTS - (component_index + 1)) and accumulated in the returned value. If the version string contains more than MAX_VERSION_COMPONENTS the remaining components are ignored.

FileMetadata ( string filename ) : UnityEngine

Parse metadata from filename and store in this class.

GetAssetImporter ( ) : AssetImporter

Get the AssetImporter associated with this file.

GetBuildTargets ( ) : HashSet

Get the list of build targets this file is compatible with.

GetEditorEnabled ( ) : bool

Determine whether this file is compatible with the editor. This is a special case as the editor isn't a "platform" covered by UnityEditor.BuildTarget.

RenameAsset ( string newFilename ) : bool

Rename the file associated with this data.

UpdateAssetLabels ( ) : void

Save metadata from this class into the asset's labels.

VersionNumberToString ( long versionNumber ) : string

Convert a numeric version back to a version string.

Private Methods

Méthode Description
GetBlackList ( ) : HashSet
GetUnityVersionMajorMinor ( ) : float
IsTargetSupportedByUnity ( BuildTarget target ) : bool
ParseTargets ( string token ) : string[]

Parse target names from a filename or label field.

ParseVersion ( string token ) : string

Parse version from a filename or label field.

Method Details

CalculateVersion() public méthode

Get a numeric version number. Each component is multiplied by VERSION_COMPONENT_MULTIPLIER^(MAX_VERSION_COMPONENTS - (component_index + 1)) and accumulated in the returned value. If the version string contains more than MAX_VERSION_COMPONENTS the remaining components are ignored.
public CalculateVersion ( ) : long
Résultat long

CalculateVersion() public static méthode

Get a numeric version number. Each component is multiplied by VERSION_COMPONENT_MULTIPLIER^(MAX_VERSION_COMPONENTS - (component_index + 1)) and accumulated in the returned value. If the version string contains more than MAX_VERSION_COMPONENTS the remaining components are ignored.
public static CalculateVersion ( string versionString ) : long
versionString string
Résultat long

FileMetadata() public méthode

Parse metadata from filename and store in this class.
public FileMetadata ( string filename ) : UnityEngine
filename string Name of the file to parse.
Résultat UnityEngine

GetAssetImporter() public méthode

Get the AssetImporter associated with this file.
public GetAssetImporter ( ) : AssetImporter
Résultat UnityEditor.AssetImporter

GetBuildTargets() public méthode

Get the list of build targets this file is compatible with.
public GetBuildTargets ( ) : HashSet
Résultat HashSet

GetEditorEnabled() public méthode

Determine whether this file is compatible with the editor. This is a special case as the editor isn't a "platform" covered by UnityEditor.BuildTarget.
public GetEditorEnabled ( ) : bool
Résultat bool

RenameAsset() public méthode

Rename the file associated with this data.
public RenameAsset ( string newFilename ) : bool
newFilename string New name of the file.
Résultat bool

UpdateAssetLabels() public méthode

Save metadata from this class into the asset's labels.
public UpdateAssetLabels ( ) : void
Résultat void

VersionNumberToString() public static méthode

Convert a numeric version back to a version string.
public static VersionNumberToString ( long versionNumber ) : string
versionNumber long
Résultat string

Property Details

ASSET_LABEL public_oe static_oe property

Label which flags whether an asset is should be managed by this module.
public static string ASSET_LABEL
Résultat string

BUILD_TARGET_NAME_TO_ENUM static_oe public_oe property

static public Dictionary BUILD_TARGET_NAME_TO_ENUM
Résultat BuildTarget>.Dictionary

filename public_oe property

Name of the file use to construct this object.
public string filename
Résultat string

filenameCanonical public_oe property

Name of the file with metadata stripped.
public string filenameCanonical
Résultat string

isManifest public_oe property

Set if this references an asset manifest.
public bool isManifest
Résultat bool

targets public_oe property

List of target platforms parsed from the filename.
public string[] targets
Résultat string[]

versionString public_oe property

Version string parsed from the filename or AssetDatabase label if it's not present in the filename.
public string versionString
Résultat string