Helper to find available new asset locations and identifiers.
More...
Helper to find available new asset locations and identifiers.
Definition at line 13 of file AssetResolver.cs.
SiliconStudio.Assets.Analysis.AssetResolver.AssetResolver |
( |
| ) |
|
Initializes a new instance of the AssetResolver class.
- Parameters
-
containsAssetWithLocation | The delegate used to check if an asset location is already used. |
containsAssetWithId | The delegate used to check if an asset identifier is already used. |
Definition at line 48 of file AssetResolver.cs.
delegate bool SiliconStudio.Assets.Analysis.AssetResolver.ContainsAssetWithIdDelegate |
( |
Guid |
guid | ) |
|
Delegate to test if an asset id is already used.
- Parameters
-
guid | The unique identifier. |
- Returns
true
if an asset id is already used, false
otherwise.
delegate bool SiliconStudio.Assets.Analysis.AssetResolver.ContainsAssetWithLocationDelegate |
( |
UFile |
location | ) |
|
Delegate to test if the specified location is already used.
- Parameters
-
location | The location to try to use. |
- Returns
true
if the specified location is already used, false
otherwise.
Creates a new AssetResolver using an existing package to check the existence of asset locations and ids.
- Parameters
-
- Returns
- A new AssetResolver.
- Exceptions
-
System.ArgumentNullException | package |
Definition at line 138 of file AssetResolver.cs.
static AssetResolver SiliconStudio.Assets.Analysis.AssetResolver.FromPackage |
( |
IList< Package > |
packages | ) |
|
|
static |
Creates a new AssetResolver using an existing package to check the existence of asset locations and ids.
- Parameters
-
- Returns
- A new AssetResolver.
- Exceptions
-
System.ArgumentNullException | package |
Definition at line 154 of file AssetResolver.cs.
bool SiliconStudio.Assets.Analysis.AssetResolver.RegisterId |
( |
Guid |
assetId, |
|
|
out Guid |
newGuid |
|
) |
| |
Registers an asset identifier for usage.
- Parameters
-
assetId | The asset identifier. |
newGuid | The new unique identifier if an asset has already been registered with the same id. |
- Returns
true
if the asset id is already in used. newGuid contains a new guid, false
otherwise.
Definition at line 120 of file AssetResolver.cs.
bool SiliconStudio.Assets.Analysis.AssetResolver.RegisterLocation |
( |
UFile |
location, |
|
|
out UFile |
newLocation |
|
) |
| |
Finds a name available for a new asset. This method will try to create a name based on an existing name and will append "_" + (number++) on every try. The new location found is added to the known existing locations.
- Parameters
-
location | The location. |
newLocation | The new location. |
- Returns
true
if there is a new location, false
otherwise.
Definition at line 107 of file AssetResolver.cs.
bool SiliconStudio.Assets.Analysis.AssetResolver.AlwaysCreateNewId |
|
getset |
Gets or sets a value indicating whether to always generate a new id on RegisterId.
true
if [force new identifier]; otherwise, false
.
Definition at line 86 of file AssetResolver.cs.
Gets or sets a delegate to test if an asset id is already used.
A delegate to test if an asset id is already used.
Definition at line 98 of file AssetResolver.cs.
Gets or sets a delegate to test if a location is already used.
A delegate to test if a location is already used.
Definition at line 92 of file AssetResolver.cs.
HashSet<Guid> SiliconStudio.Assets.Analysis.AssetResolver.ExistingIds |
|
get |
Gets the asset ids already used.
The existing ids.
Definition at line 75 of file AssetResolver.cs.
HashSet<string> SiliconStudio.Assets.Analysis.AssetResolver.ExistingLocations |
|
get |
Gets the locations already used.
The locations.
Definition at line 63 of file AssetResolver.cs.
The documentation for this class was generated from the following file:
- D:/Projects/Bitbucket Hosting/DoxygenFilesAndSources/Paradox v1.0.0 beta06/sources/assets/SiliconStudio.Assets/Analysis/AssetResolver.cs