Class OptionalPackages
Runtime detection of optional Unity packages that Scylla integrates with but does not hard-require. Lets callers fail fast with a clear, actionable message when a precompiled Scylla assembly was built against an optional package (such as Addressables or SharpZipLib) that is absent from the consuming project.
Inherited Members
Namespace: Scylla.Core.Util
Assembly: ScyllaCore.dll
Syntax
public static class OptionalPackages
Remarks
Scylla ships as precompiled assemblies. When such an assembly is compiled in a
project where an optional package is installed, the resulting DLL links against that
package's assembly. If the same DLL is later imported into a project without the
package, exercising the affected code path would otherwise raise an opaque
TypeLoadException. These checks let callers detect the situation first and
raise a descriptive exception that names the missing package instead.
Detection uses reflection against assembly-qualified type names, so this type references no optional package types directly and always loads regardless of which optional packages are installed. Results are cached after the first lookup.
Fields
ADDRESSABLES_PACKAGE_ID
Unity Package Manager id of the Addressables package.
Declaration
public const string ADDRESSABLES_PACKAGE_ID = "com.unity.addressables"
Field Value
| Type | Description |
|---|---|
| string |
SHARPZIPLIB_PACKAGE_ID
Unity Package Manager id of the SharpZipLib package.
Declaration
public const string SHARPZIPLIB_PACKAGE_ID = "com.unity.sharp-zip-lib"
Field Value
| Type | Description |
|---|---|
| string |
Properties
IsAddressablesAvailable
true when the com.unity.addressables package is present in the project,
enabling Addressables-backed loading APIs.
Declaration
public static bool IsAddressablesAvailable { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsSharpZipLibAvailable
true when the com.unity.sharp-zip-lib package is present in the project,
enabling the Zip and BZip2 compression algorithms and ZIP archive support.
Declaration
public static bool IsSharpZipLibAvailable { get; }
Property Value
| Type | Description |
|---|---|
| bool |