Table of Contents

Interface ICompanionPackageFilter

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

Decides, when a session loads, whether an Editor companion that this host would load is loaded (CompanionPackageFilter), whether a package of the session declares it or the host adds it (ICompanionPackageSource). The editor uses it to leave out the plugins and extensions the user switched off, and every plugin but its own in safe mode; the session itself skips nothing.

[Experimental("STREXP002")]
public interface ICompanionPackageFilter
Extension Methods

Methods

ShouldLoad(Package?, CompanionPackage, ILogger)

Whether the session loads an Editor companion. Called once per declaration, before the companion is restored or loaded; a skipped companion is not loaded, nor are the companions it declares, and a project of the solution that is that companion does not load its assembly.

bool ShouldLoad(Package? declaringPackage, CompanionPackage companion, ILogger log)

Parameters

declaringPackage Package

The package declaring the companion, or null for a companion the host adds itself (ICompanionPackageSource).

companion CompanionPackage

The companion's declaration.

log ILogger

The log of the session's load, where the filter says why it skips a companion.

Returns

bool

True to load the companion; false to skip it.