Class PackageLoadParameters
Parameters used for loading a package.
public sealed class PackageLoadParameters
- Inheritance
-
objectPackageLoadParameters
- Extension Methods
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
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
Properties
AllowUpgradeDowngradeRestore
Set by the in-place upgrade flow to tolerate transient NU1605 downgrades when restoring a solution from a mixed state. Off for normal loads (GameStudio, build), where a downgrade is a real error.
public bool AllowUpgradeDowngradeRestore { get; set; }
Property Value
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.
AssemblyLoadCheck
A check that each assembly of a package passes before it loads (the editor's plugin version check), or null to load them all. The session keeps the first one it is given (AssemblyLoadCheck) for later loads.
[Experimental("STREXP002")]
public IAssemblyLoadCheck? AssemblyLoadCheck { get; set; }
Property Value
AssetFiles
Gets or sets the asset files to load, if you want to not rely on the default ListAssetFiles(Package, bool, bool, bool).
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
trueif [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
trueif [automatic load assets]; otherwise,false.
BackupBeforeUpgrade
When set, an in-place upgrade snapshots each original file into a timestamped backup folder right before it overwrites it (copy-on-write — only modified files are copied), so the upgrade stays recoverable. Front-ends opt in (the asset compiler and GameStudio default it on); off for normal loads.
public bool BackupBeforeUpgrade { get; set; }
Property Value
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.
CompanionPackageFilter
Decides which Editor companions the session loads (the editor's switched-off plugins and safe mode), or null to load them all. The session keeps the first one it is given (CompanionPackageFilter) for later loads.
[Experimental("STREXP002")]
public ICompanionPackageFilter? CompanionPackageFilter { get; set; }
Property Value
CompanionPackageSource
Companion packages that the host adds to the session besides those its packages declare (the editor's extensions), or null for none. The session keeps the first one it is given (CompanionPackageSource) for later loads.
[Experimental("STREXP002")]
public ICompanionPackageSource? CompanionPackageSource { get; set; }
Property Value
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
trueif [convert u path to absolute]; otherwise,false.
EditorToolkit
The UI toolkit of the editor loading the session (Wpf or Avalonia), so the Editor companions written for another toolkit stay out. Null loads the toolkit-neutral Editor companions only.
public string? EditorToolkit { get; set; }
Property Value
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
Only makes sense for AddExistingProject(UFile, ILogger, PackageLoadParameters?).
LoadAssemblyReferences
Gets or sets a value indicating whether [load assembly references].
public bool LoadAssemblyReferences { get; set; }
Property Value
- bool
trueif [load assembly references]; otherwise,false.
LoadAssetsOfUnknownType
Load asset files whose asset type is not loaded as unloadable assets that keep their content. Only the editor sets this, so a build does not fail on a stray file.
public bool LoadAssetsOfUnknownType { get; set; }
Property Value
LoadEditorPackages
Load the editor companion packages declared by session packages (CompanionPackages). Only the editor sets this.
public bool LoadEditorPackages { get; set; }
Property Value
LoadMissingDependencies
Gets or sets a value indicating whether [load missing dependencies].
public bool LoadMissingDependencies { get; set; }
Property Value
- bool
trueif [load missing dependencies]; otherwise,false.
RemoveUnloadableObjects
If true, unloadable objects will be removed, similar to RemoveUnloadableObjects.
public bool RemoveUnloadableObjects { get; set; }
Property Value
TemporaryAssetsInMsbuild
Gets a boolean telling if MSBuild files should be evaluated when listing assets.
public bool TemporaryAssetsInMsbuild { get; set; }
Property Value
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
answerPackageUpgradeRequestedAnswerThe value to evaluate.
Returns
- bool
True if it should trigger an upgrade, false otherwise.