Description
The Package
property of the MapClass
class indicates the package from which the entity originates. This is useful for identifying the source of the entity within the context of the Sandbox environment, particularly when dealing with multiple packages or modules.
Usage
To access the package information of a MapClass
instance, simply use the Package
property. This property is read-only and provides a Sandbox.Package
object that contains details about the package.
Example
// Example of accessing the Package property
Editor.MapClass mapEntity = new Editor.MapClass();
Sandbox.Package entityPackage = mapEntity.Package;
// Use the package information
if (entityPackage != null)
{
string packageName = entityPackage.Name;
// Further processing with packageName
}