PlayerItem_SO
Defines a wearable avatar item in the m00m CharacterBuilder system. This ScriptableObject is used to configure, categorize, and price individual player cosmetics or gear.
[CreateAssetMenu(menuName = "m00m/CharacterBuilder/PlayerItem", fileName = "New Player Item")]
public class PlayerItem_SO : TransactionalItemData_Base_SO
Overview
This asset encapsulates all necessary data for rendering, equipping, purchasing, and categorizing an avatar item in the character builder. It handles visuals, pricing logic, rarity-based configuration, socket compatibility, and Firebase sync.
Properties
description
Type: string
Description: A human-readable description of the item.
isDefaultOfCategory
Type: bool
Description: Whether this is the default item for its category.
cannotBeUnequipped
Type: bool
Description: Prevents the item from being removed if true.
relatedItems
Type: List<PlayerItem_SO>
Description: References to items logically grouped with this one (e.g., part of a set).
customMaterialOverride
Type: Material
Description: Optional material override to apply on this item.
relatedSkintone
Type: PlayerSkintone
Description: Links this item to a specific skintone, if applicable.
type
Type: PlayerItemType
Description: The functional or stylistic type of this item.
occupiesSocket
Type: ItemSocketLocation
Description: Defines what socket(s) this item occupies.
category
Type: CategoryLabel
Description: High-level category used for grouping in UI or logic.
rarity
Type: Rarity
Description: Rarity tier for pricing and unlocking purposes.
subcategory
Type: string
Description: Further defines the item under its category.
subcategoryWeighting
Type: int
Description: UI sorting order within subcategory; higher values show first.
isPurchasable
Type: bool
Default: true
Description: Indicates if the item is available in the store.
freeUnlockAtLevel
Type: bool
Description: If true, the item unlocks at a certain player level.
levelForFreeUnlock
Type: int
Default: -1
Description: The player level at which this item unlocks for free.
rewardForUnlockDescription
Type: string
Description: Describes the reward associated with free unlock.
allowStackingInSocket
Type: bool
Description: Determines if multiple items can share the same socket.
ignoreCategoryForSocketCheck
Type: bool
Description: Bypasses socket-category conflicts if true.
effects
Type: List<PlayerItemEffect_SO>
Description: Gameplay or cosmetic effects associated with this item.
unlockableStatus
Type: UnlockableStatus
Default: AvailableToPurchase
Description: Status used for UI display and purchase logic.
Functions
SetPriceOffRarity()
Adjusts creditCost based on the item's rarity.
UpdateNewPricing()
Applies a newer pricing schema to legacy-priced items.
SendToFirebasePurchasables()
Triggers upload of the item’s data to Firebase.
isOwned()
Returns: bool
Checks if the item is currently unlocked for the local user.
Enums
UnlockableStatus
Defines how the item is obtained or displayed.
Rarity
Tiers: COMMON, UNCOMMON, RARE, LEGENDARY, ULTRA
CategoryLabel
UI-friendly categories such as BODY, HAIR, GLASSES, COSTUMES, etc.
ItemSocketLocation
Bitmask-style enum for where the item is worn: HAT, L_HAND, EYES, etc.
PlayerItemType
Logical item types like SHOES, HAIR, ACCESSORIES, etc.