Table of Contents

Class PackageLoadParameters

Namespace
Stride.Core.Assets
Assembly
Stride.Core.Assets.dll

Parameters used for loading a package.

public sealed class PackageLoadParameters
Inheritance
PackageLoadParameters

Constructors

PackageLoadParameters()

Initializes a new instance of the PackageLoadParameters class.

public PackageLoadParameters()

Fields

PackageUpgradeRequested

Occurs when one or more package upgrades are required for a single package. Returning false will cancel upgrades on this package.

public Func<Package, IList<PackageSession.PendingPackageUpgrade>, PackageUpgradeRequestedAnswer> PackageUpgradeRequested

Field Value

Func<Package, IList<PackageSession.PendingPackageUpgrade>, PackageUpgradeRequestedAnswer>

TemporaryAssetFilter

Occurs when an asset is about to be loaded, if false is returned the asset will be ignored and not loaded.

public Func<PackageLoadingAssetFile, bool> TemporaryAssetFilter

Field Value

Func<PackageLoadingAssetFile, bool>

Properties

AssemblyContainer

Gets or sets the assembly container used to load assemblies referenced by the package. If null, will use the Stride.Core.Reflection.AssemblyContainer.Default

public AssemblyContainer AssemblyContainer { get; set; }

Property Value

AssemblyContainer

The assembly container.

AssetFiles

Gets or sets the asset files to load, if you want to not rely on the default ListAssetFiles(ILogger, Package, bool, bool, CancellationToken?).

public List<PackageLoadingAssetFile> AssetFiles { get; set; }

Property Value

List<PackageLoadingAssetFile>

The load asset files.

AutoCompileProjects

Gets or sets a value indicating whether to automatically compile projects that don't have their assembly generated.

public bool AutoCompileProjects { get; set; }

Property Value

bool

true if [automatic compile projects]; otherwise, false.

AutoLoadTemporaryAssets

Gets or sets a value indicating whether to automatically load assets. Default is true

public bool AutoLoadTemporaryAssets { get; set; }

Property Value

bool

true if [automatic load assets]; otherwise, false.

BuildConfiguration

Gets or sets the build configuration used to AutoCompileProjects.

public string BuildConfiguration { get; set; }

Property Value

string

The build configuration.

CancelToken

Gets or sets the cancelation token.

public CancellationToken? CancelToken { get; set; }

Property Value

CancellationToken?

The cancel token.

ConvertUPathToAbsolute

Gets or sets a value indicating whether to convert all Stride.Core.IO.UPath to absolute paths when loading. Default is true

public bool ConvertUPathToAbsolute { get; set; }

Property Value

bool

true if [convert u path to absolute]; otherwise, false.

ExtraCompileProperties

Gets or sets the extra compile properties, used when AutoCompileProjects is true.

public Dictionary<string, string> ExtraCompileProperties { get; set; }

Property Value

Dictionary<string, string>

The extra compile parameters.

GenerateNewAssetIds

Gets or sets the generate new asset ids.

public bool GenerateNewAssetIds { get; set; }

Property Value

bool

The generate new asset ids.

Remarks

LoadAssemblyReferences

Gets or sets a value indicating whether [load assembly references].

public bool LoadAssemblyReferences { get; set; }

Property Value

bool

true if [load assembly references]; otherwise, false.

LoadMissingDependencies

Gets or sets a value indicating whether [load missing dependencies].

public bool LoadMissingDependencies { get; set; }

Property Value

bool

true if [load missing dependencies]; otherwise, false.

RemoveUnloadableObjects

If true, unloadable objects will be removed, similar to RemoveUnloadableObjects.

public bool RemoveUnloadableObjects { get; set; }

Property Value

bool

TemporaryAssetsInMsbuild

Gets a boolean telling if MSBuild files should be evaluated when listing assets.

public bool TemporaryAssetsInMsbuild { get; set; }

Property Value

bool

Methods

Clone()

Clones this instance.

public PackageLoadParameters Clone()

Returns

PackageLoadParameters

PackageLoadParameters.

Default()

Gets the default parameters.

public static PackageLoadParameters Default()

Returns

PackageLoadParameters

PackageLoadParameters.

ShouldUpgrade(PackageUpgradeRequestedAnswer)

Indicates if the given value of PackageUpgradeRequestedAnswer should trigger an upgrade.

public static bool ShouldUpgrade(PackageUpgradeRequestedAnswer answer)

Parameters

answer PackageUpgradeRequestedAnswer

The value to evaluate.

Returns

bool

True if it should trigger an upgrade, false otherwise.