The Favourited
property of the Package
class represents the number of players who have added this package to their favourites. This property is useful for determining the popularity of a package among players.
The Favourited
property of the Package
class represents the number of players who have added this package to their favourites. This property is useful for determining the popularity of a package among players.
To access the Favourited
property, you need to have an instance of the Package
class. You can then read the property to get the number of times the package has been favourited by players.
// Example of accessing the Favourited property // Assume 'package' is an instance of Sandbox.Package int numberOfFavourites = package.Favourited; // Output the number of favourites // Note: Avoid using Console.WriteLine in Sandbox // Instead, use appropriate UI elements to display this information // Example: Display in a UI label or log to a file // UIElement.Text = $"This package has been favourited {numberOfFavourites} times.";