5 using System.Collections.Generic;
7 using SiliconStudio.BuildEngine;
9 namespace SiliconStudio.Assets.Compiler
21 private Func<AssetItem> getNextThumbnailToBuild;
22 private readonly
object internObjectsLock =
new object();
29 private readonly Queue<BuildStep> nextBuildSteps =
new Queue<BuildStep>();
37 if (context == null)
throw new ArgumentNullException(
"context");
39 this.context = context;
45 public Func<AssetItem> GetNextThumbnailToBuild
47 get {
return getNextThumbnailToBuild; }
50 lock (internObjectsLock)
51 getNextThumbnailToBuild = value;
62 if (nextBuildSteps.Count > 0)
63 return nextBuildSteps.Dequeue();
67 lock (internObjectsLock)
69 if (GetNextThumbnailToBuild != null)
70 nextItem = GetNextThumbnailToBuild();
77 nextBuildSteps.Enqueue(CompileItem(context, compilationResult, nextItem));
81 if (nextBuildSteps.Count > 0)
82 return nextBuildSteps.Dequeue();
93 ThumbnailCompilerRegistry.DefaultCompiler = compiler;
Result of a compilation of assets when using IAssetCompiler.Compile
A thumbnail list compiler. This compiler creates the list of build steps to perform to produce the th...
static void RegisterDefaultThumbnailCompiler(IAssetCompiler compiler)
Register a default compiler to use when no compiler is explicitly associated to an asset type...
ThumbnailListCompiler(ThumbnailCompilerContext context)
Creates an instance of ThumbnailListCompiler.
An asset item part of a Package accessible through SiliconStudio.Assets.Package.Assets.
BuildStep GetNextBuildStep()
Get the next build step to execute to compile the thumbnail.
The base class to compile a series of AssetItems using associated IAssetCompilers. An item list compiler only creates the build steps required to creates some output items. The result of a compilation has then to be executed by the build engine to effectively create the outputs items.
A registry containing the thumbnail compilers of the assets.
Main interface for compiling an Asset.
This interface describes a class that is capable of providing build steps to a DynamicBuildStep.
The context used when building the thumbnail of an asset in a Package.