Description
The EngineVersion
property of the Package
class indicates the version of the game engine that was used when the package was uploaded. This information is crucial for ensuring compatibility, especially when the base game undergoes significant API changes. By knowing the engine version, developers can manage dependencies and compatibility issues more effectively.
Usage
To access the engine version of a package, simply use the EngineVersion
property on an instance of the Package
class. This property is read-only and returns an integer representing the engine version.
Example
// Example of accessing the EngineVersion property
Package myPackage = new Package();
int engineVersion = myPackage.EngineVersion;
// Use the engine version to check compatibility
if (engineVersion < requiredVersion)
{
// Handle compatibility issues
throw new InvalidOperationException("The package is not compatible with the current engine version.");
}