![]() |
Paradox Game Engine
v1.0.0 beta06
|
An asset item part of a Package accessible through SiliconStudio.Assets.Package.Assets. More...
Public Member Functions | |
AssetItem (UFile location, Asset asset) | |
Initializes a new instance of the AssetItem class. More... | |
AssetReference | ToReference () |
Converts this item to a reference. More... | |
AssetItem | Clone (UFile newLocation=null, Asset newAsset=null) |
Clones this instance without the attached package. More... | |
override string | ToString () |
Asset | CreateChildAsset () |
Creates a child asset that is inheriting the values of this asset. More... | |
AssetItem | FindBase () |
Finds the base item referenced by this item from the current session (using the Package setup on this instance) More... | |
List< AssetItem > | FindAssetsFromChange (MemberPath path, MemberPathAction action, object value) |
This methods returns all assets that would be changed when trying to change this asset. More... | |
Static Public Attributes | |
static readonly IEqualityComparer< AssetItem > | DefaultComparerById = new AssetItemComparerById() |
The default comparer use only the id of an assetitem to match assets. More... | |
Properties | |
UFile | Location [get, set] |
Gets the location of this asset. More... | |
UDirectory | SourceFolder [get, set] |
Gets the directory where the assets will be stored on the disk relative to the Package. The directory will update the list found in PackageProfile.AssetFolders More... | |
Guid | Id [get] |
Gets the unique identifier of this asset. More... | |
Package | Package [get, set] |
Gets the package where this asset is stored. More... | |
UFile | FullPath [get] |
Gets the full absolute path of this asset on the disk, taking into account the SourceFolder, and the SiliconStudio.Assets.Package.RootDirectory. See remarks. More... | |
Asset | Asset [get, set] |
Gets or sets the asset. More... | |
DateTime | ModifiedTime [get, set] |
Gets the modified time. See remarks. More... | |
bool | IsDirty [get, set] |
Gets or sets a value indicating whether this instance is dirty. See remarks. 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... | |
An asset item part of a Package accessible through SiliconStudio.Assets.Package.Assets.
Definition at line 17 of file AssetItem.cs.
Initializes a new instance of the AssetItem class.
location | The location. |
asset | The asset. |
System.ArgumentNullException | location |
System.ArgumentException | asset |
Definition at line 37 of file AssetItem.cs.
Clones this instance without the attached package.
newLocation | The new location that will be used in the cloned AssetItem. If this parameter is null, it keeps the original location of the asset. |
newAsset | The new asset that will be used in the cloned AssetItem. If this parameter is null, it clones the original asset. otherwise, the specified asset is used as-is in the new AssetItem (no clone on newAsset is performed) |
Definition at line 126 of file AssetItem.cs.
Asset SiliconStudio.Assets.AssetItem.CreateChildAsset | ( | ) |
Creates a child asset that is inheriting the values of this asset.
Definition at line 256 of file AssetItem.cs.
References SiliconStudio.Assets.AssetCloner.Clone().
List<AssetItem> SiliconStudio.Assets.AssetItem.FindAssetsFromChange | ( | MemberPath | path, |
MemberPathAction | action, | ||
object | value | ||
) |
This methods returns all assets that would be changed when trying to change this asset.
path | The path. |
action | The action. |
value | The value. |
System.ArgumentNullException | path |
Definition at line 298 of file AssetItem.cs.
AssetItem SiliconStudio.Assets.AssetItem.FindBase | ( | ) |
Finds the base item referenced by this item from the current session (using the Package setup on this instance)
Definition at line 280 of file AssetItem.cs.
References SiliconStudio.Assets.Asset.Base, SiliconStudio.Assets.AssetBase.IsRootImport, and SiliconStudio.Assets.Package.Session.
AssetReference SiliconStudio.Assets.AssetItem.ToReference | ( | ) |
Converts this item to a reference.
Definition at line 112 of file AssetItem.cs.
override string SiliconStudio.Assets.AssetItem.ToString | ( | ) |
Definition at line 247 of file AssetItem.cs.
|
static |
The default comparer use only the id of an assetitem to match assets.
Definition at line 28 of file AssetItem.cs.
|
getset |
Gets or sets the asset.
The asset.
Definition at line 197 of file AssetItem.cs.
Referenced by SiliconStudio.Assets.Compiler.AssetCompilerBase< T >.Compile(), SiliconStudio.Assets.Compiler.AssetDependenciesCompilerBase< T >.Compile(), SiliconStudio.Assets.Compiler.ThumbnailCompilerBase< T >.Compile(), and SiliconStudio.Assets.Analysis.AssetBaseAnalysis.ValidateAssetBase().
|
get |
Gets the full absolute path of this asset on the disk, taking into account the SourceFolder, and the SiliconStudio.Assets.Package.RootDirectory. See remarks.
The full absolute path of this asset on the disk.
This value is only valid if this instance is attached to a Package, and that the package has a non null SiliconStudio.Assets.Package.RootDirectory.
Definition at line 168 of file AssetItem.cs.
Referenced by SiliconStudio.Assets.Compiler.ThumbnailCompilerBase< T >.CompileOverride().
|
get |
Gets the unique identifier of this asset.
The unique identifier.
Definition at line 85 of file AssetItem.cs.
Referenced by SiliconStudio.Assets.PackageAssetCollection.CheckCanAdd(), and SiliconStudio.Assets.AssetImportSession.Import().
|
getset |
Gets or sets a value indicating whether this instance is dirty. See remarks.
true
if this instance is dirty; otherwise, false
.
When an asset is modified, this property must be set to true in order to track assets changes.
Definition at line 227 of file AssetItem.cs.
|
getset |
Gets the location of this asset.
The location.
Definition at line 51 of file AssetItem.cs.
Referenced by SiliconStudio.Assets.AssetImportSession.AddExistingAssetForReImport(), and SiliconStudio.Assets.Compiler.AssetCompilerBase< T >.Compile().
|
getset |
Gets the modified time. See remarks.
The modified time.
By default, contains the last modified time of the asset from the disk. If IsDirty is also updated from false to true , this time will get current time of modification.
Definition at line 217 of file AssetItem.cs.
|
getset |
Gets the package where this asset is stored.
The package.
Definition at line 97 of file AssetItem.cs.
Referenced by SiliconStudio.Assets.AssetImportSession.AddExistingAssetForReImport(), SiliconStudio.Assets.PackageAssetCollection.CheckCanAdd(), SiliconStudio.Assets.Compiler.AssetDependenciesCompilerBase< T >.Compile(), SiliconStudio.Assets.AssetImportSession.IsExistingAssetForReImportSupported(), and SiliconStudio.Assets.Analysis.AssetAnalysis.Run().
|
getset |
Gets the directory where the assets will be stored on the disk relative to the Package. The directory will update the list found in PackageProfile.AssetFolders
The directory.
Definition at line 69 of file AssetItem.cs.