Paradox Game Engine
v1.0.0 beta06
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Macros
Pages
EntityAssetCompiler.cs
Go to the documentation of this file.
1
// Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2
// This file is distributed under GPL v3. See LICENSE.md for details.
3
4
using
System.Threading.Tasks;
5
using
SiliconStudio.Assets.Compiler;
6
using
SiliconStudio.BuildEngine;
7
using
SiliconStudio.Core.IO;
8
using
SiliconStudio.Core.Serialization.Assets;
9
10
namespace
SiliconStudio.
Paradox
.Assets.Model
11
{
12
public
class
EntityAssetCompiler
: AssetCompilerBase<EntityAsset>
13
{
14
protected
override
void
Compile
(
AssetCompilerContext
context,
string
urlInStorage,
UFile
assetAbsolutePath,
EntityAsset
asset,
AssetCompilerResult
result)
15
{
16
result.BuildSteps =
new
ListBuildStep
{
new
EntityCombineCommand(urlInStorage, asset) };
17
}
18
19
private
class
EntityCombineCommand :
AssetCommand
<EntityAsset>
20
{
21
public
EntityCombineCommand(
string
url,
EntityAsset
asset) : base(url, asset)
22
{
23
}
24
25
protected
override
Task<ResultStatus>
DoCommandOverride(
ICommandContext
commandContext)
26
{
27
var assetManager =
new
AssetManager
();
28
assetManager.Save(Url, asset.Data);
29
30
return
Task.FromResult(ResultStatus.Successful);
31
}
32
}
33
}
34
}
SiliconStudio.Assets.Compiler.AssetCompilerResult
Result of a compilation of assets when using IAssetCompiler.Compile
Definition:
AssetCompilerResult.cs:11
SiliconStudio.Assets.Compiler.AssetCommand
A command processing an Asset.
Definition:
AssetCommand.cs:11
SiliconStudio.BuildEngine.ICommandContext
Definition:
ICommandContext.cs:11
SiliconStudio.BuildEngine.ListBuildStep
Definition:
ListBuildStep.cs:12
SiliconStudio.Assets.Compiler.AssetCompilerContext
The context used when compiling an asset in a Package.
Definition:
AssetCompilerContext.cs:10
SiliconStudio.Core.Serialization.Assets.AssetManager
Definition:
AssetManager.AssetReference.cs:12
SiliconStudio.Paradox.Assets.Model.EntityAssetCompiler.Compile
override void Compile(AssetCompilerContext context, string urlInStorage, UFile assetAbsolutePath, EntityAsset asset, AssetCompilerResult result)
Definition:
EntityAssetCompiler.cs:14
SiliconStudio.Paradox.Assets.Model.EntityAssetCompiler
Definition:
EntityAssetCompiler.cs:12
SiliconStudio.Paradox.Graphics.Paradox
Paradox image file.
Task
SiliconStudio.Paradox.Assets.Model.EntityAsset
Definition:
EntityAsset.cs:17
SiliconStudio.Core.IO.UFile
Defines a normalized file path. See UPath for details. This class cannot be inherited.
Definition:
UFile.cs:13
sources
engine
SiliconStudio.Paradox.Assets.Model
EntityAssetCompiler.cs
Generated on Sat Dec 20 2014 21:51:28 for Paradox Game Engine by
1.8.7