3 using System.Collections.Generic;
5 using SiliconStudio.Assets.Compiler;
6 using SiliconStudio.BuildEngine;
7 using SiliconStudio.Core.IO;
8 using SiliconStudio.Paradox.Shaders.Compiler;
10 namespace SiliconStudio.
Paradox.Assets.Effect
17 private static readonly List<ICompilerParametersGenerator> registeredCompilerParametersGenerators =
new List<ICompilerParametersGenerator>();
27 lock (registeredCompilerParametersGenerators)
29 return registeredCompilerParametersGenerators.ToList();
40 lock (registeredCompilerParametersGenerators)
42 if (!registeredCompilerParametersGenerators.Contains(generator))
44 var insertIndex = registeredCompilerParametersGenerators.FindIndex(x => x.GeneratorPriority > generator.GeneratorPriority);
45 if (insertIndex == -1)
46 registeredCompilerParametersGenerators.Add(generator);
48 registeredCompilerParametersGenerators.Insert(insertIndex, generator);
55 result.ShouldWaitForPreviousBuilds =
true;
56 result.BuildSteps =
new ListBuildStep {
new EffectCompileGeneratorBuildStep(context, urlInStorage, RegisteredCompilerParametersGenerators.ToList(), asset) };
Result of a compilation of assets when using IAssetCompiler.Compile
override void Compile(AssetCompilerContext context, string urlInStorage, UFile assetAbsolutePath, EffectLibraryAsset asset, AssetCompilerResult result)
The context used when compiling an asset in a Package.
Describes an effect asset.
A dynamic generator of CompilerParameters from a source parameters. See remarks.
Entry point to compile an EffectLibraryAsset
static void RegisterCompilerParametersGenerator(ICompilerParametersGenerator generator)
Registers a CompilerParameters generator.
Defines a normalized file path. See UPath for details. This class cannot be inherited.