![]() |
Paradox Game Engine
v1.0.0 beta06
|
A package managing assets. More...
Public Member Functions | |
Package () | |
Initializes a new instance of the Package class. More... | |
LoggerResult | AddExitingProject (UFile pathToMsproj) |
Adds an exiting project to this package. More... | |
void | AddExitingProject (UFile pathToMsproj, LoggerResult logger) |
Adds an exiting project to this package. More... | |
Package | Clone (bool deepCloneAsset) |
Deep clone this package. More... | |
void | SetPackagePath (UFile newPath, bool copyAssets=true) |
Sets the package path. More... | |
LoggerResult | Save () |
Saves this package and all dirty assets. See remarks. More... | |
void | Save (ILogger log) |
Saves this package and all dirty assets. See remarks. More... | |
void | ValidateAssets (bool alwaysGenerateNewAssetId=false) |
void | LoadTemporaryAssets (ILogger log, CancellationToken?cancelToken=null) |
Refreshes this package from the disk by loading or reloading all assets. More... | |
![]() | |
virtual void | SetDefaults () |
Sets the defaults values for this instance More... | |
override string | ToString () |
Static Public Member Functions | |
static Guid | GetPackageIdFromFile (string filePath) |
Gets the package identifier from file. More... | |
static Package | Load (ILogger log, string filePath, PackageLoadParameters loadParametersArg=null) |
Loads only the package description but not assets or plugins. More... | |
Public Attributes | |
const string | PackageFileExtension = ".pdxpkg" |
The file extension used for Package. More... | |
Properties | |
bool | IsSystem [get, set] |
Gets or sets a value indicating whether this package is a system package. More... | |
PackageMeta | Meta [get, set] |
Gets or sets the metadata associated with this package. More... | |
List< PackageReference > | LocalDependencies [get] |
Gets the local package dependencies used by this package (only valid for local references). Global dependencies are defined through the Meta property in PackageMeta.Dependencies More... | |
PackageProfileCollection | Profiles [get, set] |
Gets the profiles. More... | |
List< UDirectory > | ExplicitFolders [get] |
Gets or sets the list of folders that are explicitly created but contains no assets. More... | |
BundleCollection | Bundles [get, set] |
Gets the bundles defined for this package. More... | |
List< TemplateFolder > | TemplateFolders [get, set] |
Gets the template folders. More... | |
List< TemplateDescription > | Templates [get, set] |
Gets the loaded templates from the TemplateFolders More... | |
PackageAssetCollection | Assets [get] |
Gets the assets stored in this package. More... | |
AssetItemCollection | TemporaryAssets [get] |
Gets the temporary assets list loaded from disk before they are going into Assets. More... | |
UFile | FullPath [get, set] |
Gets the path to the package file. May be null if the package was not loaded or saved. More... | |
bool | IsDirty [get, set] |
Gets or sets a value indicating whether this instance has been modified since last saving. More... | |
UDirectory | RootDirectory [get] |
Gets the top directory of this package on the local disk. More... | |
PackageSession | Session [get, set] |
Gets the session. More... | |
![]() | |
Guid | Id [get, set] |
Gets or sets the unique identifier of this asset. More... | |
int | SerializedVersion [get, set] |
Gets or sets the version number for this asset, used internally when migrating assets. More... | |
AssetBase | Base [get, set] |
Gets or sets the base. More... | |
int | BuildOrder [get, set] |
Gets or sets the build order for this asset. More... | |
TagCollection | Tags [get, set] |
Gets the tags for this asset. More... | |
![]() | |
UFile | FullPath [get] |
Gets the full path on disk where this instance is stored. More... | |
![]() | |
bool | IsDirty [get, set] |
Gets or sets a value indicating whether this instance is dirty. More... | |
Events | |
Action< Asset > | AssetDirtyChanged |
Occurs when an asset dirty changed occured. More... | |
Additional Inherited Members | |
![]() | |
Asset () | |
Initializes a new instance of the Asset class. More... | |
A package managing assets.
Definition at line 28 of file Package.cs.
SiliconStudio.Assets.Package.Package | ( | ) |
Initializes a new instance of the Package class.
Definition at line 56 of file Package.cs.
LoggerResult SiliconStudio.Assets.Package.AddExitingProject | ( | UFile | pathToMsproj | ) |
Adds an exiting project to this package.
pathToMsproj | The path to msproj. |
Definition at line 240 of file Package.cs.
void SiliconStudio.Assets.Package.AddExitingProject | ( | UFile | pathToMsproj, |
LoggerResult | logger | ||
) |
Adds an exiting project to this package.
pathToMsproj | The path to msproj. |
logger | The logger. |
Definition at line 252 of file Package.cs.
References SiliconStudio.Core.IO.UPath.IsAbsolute.
Package SiliconStudio.Assets.Package.Clone | ( | bool | deepCloneAsset | ) |
Deep clone this package.
deepCloneAsset | if set to true assets will stored in this package will be also deeply cloned. |
Definition at line 313 of file Package.cs.
References SiliconStudio.Assets.AssetCloner.Clone().
|
static |
Gets the package identifier from file.
filePath | The file path. |
System.ArgumentNullException | log or filePath |
Definition at line 499 of file Package.cs.
|
static |
Loads only the package description but not assets or plugins.
log | The log to receive error messages. |
filePath | The file path. |
loadParametersArg | The load parameters argument. |
System.ArgumentNullException | log or filePath |
Definition at line 515 of file Package.cs.
void SiliconStudio.Assets.Package.LoadTemporaryAssets | ( | ILogger | log, |
CancellationToken? | cancelToken = null |
||
) |
Refreshes this package from the disk by loading or reloading all assets.
log | The log. |
cancelToken | The cancel token. |
System.InvalidOperationException | Package RootDirectory is null or Package RootDirectory [{0}] does not exist.ToFormat(RootDirectory) |
Definition at line 621 of file Package.cs.
References SiliconStudio.Assets.AssetCloner.Clone(), SiliconStudio.Assets.FileUtility.EnumerateDirectories(), SiliconStudio.Assets.AssetRegistry.IsAssetFileExtension(), SiliconStudio.Assets.Package.RootDirectory, and SiliconStudio.Core.IO.UDirectory.This.
LoggerResult SiliconStudio.Assets.Package.Save | ( | ) |
Saves this package and all dirty assets. See remarks.
saveAllAssets | if set to true [save all assets]. |
When calling this method directly, it does not handle moving assets between packages. Call PackageSession.Save instead.
Definition at line 384 of file Package.cs.
void SiliconStudio.Assets.Package.Save | ( | ILogger | log | ) |
Saves this package and all dirty assets. See remarks.
log | The log. |
System.ArgumentNullException | log |
When calling this method directly, it does not handle moving assets between packages. Call PackageSession.Save instead.
Definition at line 398 of file Package.cs.
References SiliconStudio.Assets.AssetCloner.Clone().
void SiliconStudio.Assets.Package.SetPackagePath | ( | UFile | newPath, |
bool | copyAssets = true |
||
) |
Sets the package path.
newPath | The new path. |
copyAssets | if set to true assets will be copied relatively to the new location. |
Definition at line 333 of file Package.cs.
void SiliconStudio.Assets.Package.ValidateAssets | ( | bool | alwaysGenerateNewAssetId = false | ) |
Definition at line 573 of file Package.cs.
const string SiliconStudio.Assets.Package.PackageFileExtension = ".pdxpkg" |
The file extension used for Package.
Definition at line 46 of file Package.cs.
Referenced by SiliconStudio.Assets.PackageArchive.Build(), SiliconStudio.Paradox.ProjectGenerator.PackageUnitTestGenerator.Generate(), and SiliconStudio.Assets.PackageStore.GetPackageFileName().
|
get |
Gets the assets stored in this package.
The assets.
Definition at line 144 of file Package.cs.
Referenced by SiliconStudio.Paradox.Assets.Materials.Generators.MaterialCompilerParametersGenerator.Generate(), and SiliconStudio.Paradox.Assets.Effect.Generators.EntityCompilerParametersGenerator.Generate().
|
getset |
|
get |
Gets or sets the list of folders that are explicitly created but contains no assets.
Definition at line 110 of file Package.cs.
|
getset |
Gets the path to the package file. May be null if the package was not loaded or saved.
The package path.
Definition at line 170 of file Package.cs.
Referenced by SiliconStudio.Assets.PackageReference.operator PackageReference().
|
getset |
Gets or sets a value indicating whether this instance has been modified since last saving.
true
if this instance is dirty; otherwise, false
.
Definition at line 187 of file Package.cs.
|
getset |
Gets or sets a value indicating whether this package is a system package.
true
if this package is a system package; otherwise, false
.
Definition at line 75 of file Package.cs.
Referenced by SiliconStudio.Assets.PackageSession.Save().
|
get |
Gets the local package dependencies used by this package (only valid for local references). Global dependencies are defined through the Meta property in PackageMeta.Dependencies
The package local dependencies.
Definition at line 91 of file Package.cs.
Referenced by SiliconStudio.Assets.PackageExtensions.ContainsAsset(), and SiliconStudio.Assets.PackageSession.Save().
|
getset |
Gets or sets the metadata associated with this package.
The meta.
Definition at line 82 of file Package.cs.
Referenced by SiliconStudio.Assets.PackageExtensions.ContainsAsset(), and SiliconStudio.Assets.PackageSession.Save().
|
getset |
|
get |
Gets the top directory of this package on the local disk.
The top directory.
Definition at line 205 of file Package.cs.
Referenced by SiliconStudio.Assets.Package.LoadTemporaryAssets().
|
getset |
Gets the session.
The session.
System.InvalidOperationException | Cannot attach a package to more than one session |
Definition at line 219 of file Package.cs.
Referenced by SiliconStudio.Assets.AssetImportSession.AddExistingAssetForReImport(), SiliconStudio.Assets.PackageAssetCollection.CheckCanAdd(), SiliconStudio.Assets.Compiler.AssetDependenciesCompilerBase< T >.Compile(), SiliconStudio.Assets.AssetItem.FindBase(), SiliconStudio.Assets.AssetImportSession.IsExistingAssetForReImportSupported(), and SiliconStudio.Assets.Templates.TemplateGeneratorContext.TemplateGeneratorContext().
|
getset |
|
getset |
Gets the loaded templates from the TemplateFolders
The templates.
Definition at line 136 of file Package.cs.
|
get |
Gets the temporary assets list loaded from disk before they are going into Assets.
The temporary assets.
Definition at line 157 of file Package.cs.
Referenced by SiliconStudio.Assets.PackageSession.Save().
Action<Asset> SiliconStudio.Assets.Package.AssetDirtyChanged |
Occurs when an asset dirty changed occured.
Definition at line 51 of file Package.cs.