Knowledge Base
HomeProductsCommunityReviewsSocial
Old Knowledge Base
Old Knowledge Base
  • Knowledge Base
    • Getting to know us
  • Where to Buy
    • Become a Sponsor
    • Heathen License Agreement
  • General
    • ๐Ÿ”ŽTable of Contents
    • ๐ŸคฉGetting Started
      • Indie Check List
      • Sourcing Resources
        • ๐Ÿง™โ€โ™‚๏ธCommunity
        • ๐Ÿงžโ€โ™‚๏ธManaged Services
        • ๐Ÿ“ฃMarketing
        • ๐ŸงชTesting
    • ๐ŸงžTips and Tricks
      • Fundamentals
        • Development Phases
      • Unity
        • Package Manager Installs
          • Missing asset after update
        • Unity Release Version
      • Unreal
        • Unity to Unreal
        • Quick Start
    • ๐Ÿ“Design
      • โ˜๏ธQuick Start
      • ๐ŸฅพBootstraping
      • ๐Ÿค‘Monetization
        • What not to do
        • Models
          • Free
          • Free to Play
          • Pay to Play
          • Pay to Win
          • Play to Earn
        • Tools
          • ๐Ÿ˜กArtificial Scarcity
          • ๐Ÿค‘Bundles
          • ๐Ÿค”Community Marketplace
          • ๐Ÿค‘Expansions
          • ๐Ÿ˜กFear of Missing Out (FOMO)
          • ๐Ÿ˜กGatcha Mechanics
          • ๐Ÿค”Microtransactions (MTX)
          • ๐Ÿ˜กNFT
            • ๐Ÿ˜กBlockchain
          • ๐Ÿค”No Spend Cap
          • ๐Ÿ˜กPremium Currency
          • ๐Ÿค”Season
          • ๐Ÿค‘Subscription
          • ๐Ÿ˜กSurprise Mechanics
      • ๐ŸŽฎMultiplayer
        • Networking Tools
        • Terminology
      • ๐ŸคนMulti-Scene Architecture
      • ๐ŸŒProject Architecture
      • ๐Ÿ˜ŠPlayer Motivation
    • ๐Ÿ—๏ธDevelopment
      • โ˜๏ธQuick Start
      • โ˜Ž๏ธCallbacks & Delegates
      • โ”Conditional Compilation
      • ๐ŸชณDebugging
      • ๐ŸšงDevOps
        • โ˜•Team Collaboration
        • ๐Ÿ›‚Git Control & Unity
      • โ‰๏ธError Handling
        • System Dialog
        • Reporting
      • ๐ŸคฏIntelliSense
      • ๐ŸชถLambda Expressions
      • ๐Ÿคนโ€โ™€๏ธMulti Platform Projects
      • ๐Ÿ“‘Namespace and Using
      • ๐ŸŽฎUnity's "New" Input System
      • ๐Ÿ”ผUpdating Visual Studio and C#
      • ๐Ÿ’กVisual Scripting
    • โš ๏ธPublishers
    • ๐ŸงชTesting
      • ๐Ÿ‘‹Introduction
      • โœ๏ธWriting Formal Tests
    • ๐Ÿง™โ€โ™‚๏ธCommunity
      • โ˜๏ธQuick Start
    • ๐Ÿ“ฃMarketing
      • โ˜๏ธQuick Start
      • ๐Ÿ“ŒTips and Tactics
      • ๐Ÿค“Market Research
    • ๐Ÿ“†Release
    • ๐Ÿ—บ๏ธLive
  • Steam
    • โ˜๏ธQuick Start
    • ๐Ÿ†Achievements
    • ๐ŸŒณBranches
    • ๐Ÿ—ฃ๏ธCommunity Hub
    • โฌ†๏ธUploading to Steam
    • โ˜๏ธCloud Save
    • ๐Ÿ†”CSteamID
    • ๐Ÿ”ŽDiscovery Queue
    • ๐Ÿ•น๏ธDownloadable Content
    • ๐ŸšซEarly Access
    • ๐Ÿ–ฑ๏ธInput
    • ๐Ÿ“ฆInventory
      • ๐Ÿ”จCrafting System
      • ๐Ÿ› ๏ธItem Definition Tools
      • ๐Ÿ’ธMicrotransactions
      • ๐ŸŽPromo Items
    • ๐ŸšขLaunch
    • ๐Ÿฅ‡Leaderboards
      • ๐Ÿ—ฃ๏ธAdvanced Profiles
    • ๐ŸŽฎMultiplayer
      • โ˜๏ธGetting Started
      • ๐ŸงชDev and Test
      • ๐Ÿง‘โ€โš–๏ธAuthentication
      • ๐Ÿ›‹๏ธLobby
      • ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘Matchmaking
      • ๐Ÿง‘โ€๐Ÿ”งRich Presence
      • ๐Ÿ’ฌRoom Systems
      • ๐Ÿ’Steam Game Server
        • ๐Ÿ‘ทBuilds
        • โš™๏ธConfiguration
        • ๐Ÿ“‹Server Browser
        • ๐ŸงSetup Linux
      • ๐Ÿ—ฃ๏ธTerminology
    • ๐ŸคนMulti-Platform Project
    • ๐ŸงชPlaytest
    • ๐Ÿ›‹๏ธRemote Play
    • ๐Ÿ‘€Reviews
    • ๐ŸƒRunning a Build
    • ๐Ÿ’ถSales
    • โญStats
    • ๐Ÿ”‘Steam API Key
    • ๐Ÿ“ƒsteam_appid.txt
    • ๐Ÿ–ฅ๏ธSteam Deck
    • โš™๏ธSteamworks
    • ๐ŸคฏStore Page
    • ๐Ÿ› ๏ธWorkshop
      • Creating an Item
      • In-Game Browser
      • Subscribed Items
    • ๐Ÿง‘โ€๐ŸซUser Information
      • Unity User Tools
      • Unreal User Tools
    • ๐Ÿ—ฃ๏ธVoice
  • Toolkit for Steamworks
    • Introduction
    • Maintenance Cycle
    • F.A.Q
    • Unity
      • โš ๏ธKnown Issues
      • Unity Asset Refund Policy
      • Installation
        • Networking Integrations
      • Getting Started
      • Debugging
      • Learning
      • API Extensions
        • App.Client
        • App.Server
        • App.Web
        • Authentication
        • BigPicture.Client
        • Clans.Client
        • Friends.Client
        • Input.Client
        • Inventory.Client
        • Leaderboards.Client
        • Matchmaking.Client
        • Overlay.Client
        • Parties.Client
        • RemotePlay.Client
        • RemoteStorage.Client
        • Screenshots.Client
        • StatsAndAchievements.Client
        • StatsAndAchievements.Server
        • User.Client
        • UserGeneratedContent.Client
        • Utilities
        • Utilities.Client
        • Voice.Client
      • Objects
        • Classes
          • Achievement Data
          • Achievement Object
          • App Data
          • Authentication Session
          • Authentication Ticket
          • Avg Rate Stat
          • Chat Room
          • Clan Chat Msg
          • Clan Data
          • Currency
          • Data Model
          • DLC Data
          • Downloadable Content Object
          • Favorite Game
          • Float Stat
          • Game Data
          • Input Action
          • Input Action Data
          • Input Action Set
          • Input Action Set Data
          • Input Action Set Layer
          • Input Action Update
          • Input Controller Data
          • Int Stat
          • Inventory Result
          • Item Data
          • Item Definition
          • Item Detail
          • Leaderboard Data
          • Leaderboard Entry
          • Leaderboard Object
          • Lobby Chat Msg
          • Lobby Data
          • Lobby Game Server
          • Lobby Member Data
          • Party Beacon Details
          • Rank Change
          • Remote Storage File
          • Stat Data
          • Steam Game Server Configuration
          • UGC Query
          • User Data
          • Steam Settings
            • Colors
            • Game Client
              • Inventory Settings
            • Game Server
          • User Leave Data
          • Workshop Item
          • Workshop Item Data
          • Workshop Item Data Create Status
          • Workshop Item Key Value Tag
          • Workshop Item Preview File
        • Components
          • Friend Manager
          • Game Server Browser Manager
          • Input Action Event
          • Input Action Glyph
          • Input Action Name
          • Inventory Manager
          • Item Shopping Cart Manager
          • Leaderboard Manager
          • Leaderboard User Entry
          • Overlay Manager
          • Steam Game Server Events
          • Steam Input Manager
          • Steamworks Event Triggers
          • UGC Query Manager
          • Voice Recorder
          • Voice Stream
        • Enums
          • Friend Dialog
          • Inventory Item Type
          • Language Codes
          • Overlay Dialog
          • Sample Rate Method
          • Valve Price Categories
        • Prefabs
          • ๐Ÿ“ฆClan Chat
          • ๐Ÿ“ฆClan List
          • ๐Ÿ“ฆClan Member Count
          • ๐Ÿ“ฆFriend Avatar
          • ๐Ÿ“ฆFriend Groups
          • ๐Ÿ“ฆFriend List
          • ๐Ÿ“ฆFriend Name
          • ๐Ÿ“ฆFriend Profile
          • ๐Ÿ“ฆSelectable Friend ID
        • Programming Tools
          • IChatMessage
          • ILeaderboardEntryDisplay
          • IUserProfile
          • IWorkshopBrowserItemTemplate
          • LobbyMemberSlot
          • User Invite Button
        • UI Components
          • Chat Auto Join
          • Chat Stream
          • Clan Chat Director
          • Clan Chat Member Counter
          • Clan Chat Member List
          • Clan List
          • Clan Profile
          • Friend Group
          • Friend Groups Display
          • Friend Invite Dropdown
          • Friend List
          • Friend Profile
            • Image Field
            • Message Options
            • Text Field
          • Input Action Glyph
          • Input Action Name
          • Leaderboard Entry UI Record
          • Leaderboard UI List
          • Lobby Chat Director
          • Lobby Member Slot
          • Lobby Manager
          • Party Lobby Control
          • Quick Match Lobby Control
          • Rich Presence Reader
          • Rich Presence Setter
          • Set Achievement Description
          • Set Achievement Icon
          • Set Achievement Name
          • Set User Avatar
          • Set User Id Input Field
          • Set User Id Label
          • Set User Name
          • Toggle Event Helper
          • Workshop Browser Simple Item Record
      • Legacy
        • Troubleshooting
        • Getting Started
          • GameObject Initialization
          • ScriptableObject Initialization
          • API Initialization
        • Build Upload Tool
        • Debugging Tools
          • Testing
        • Components
          • Steamworks Behaviour
          • Steamworks Creator
          • Steam System Events
    • Unreal
      • What's New!
      • Installation
      • Getting Started
      • Updating Steamworks SDK
      • Packaging
      • Game Instance
      • Sockets Net Driver
      • Online Subsystem
      • Data Assets
        • Achievement
        • Downloadable Content
        • Inventory Item
        • Leaderboard
        • Stat
      • Widgets
        • BP_FriendsListDisplay
        • BP_FriendsListEntry
        • BP_FriendsListGroup
        • BP_SteamAvatarImage
        • BP_SteamUserName
      • Blueprint Nodes
        • Functions
          • ๐Ÿ”ตAdd Favorite Game
          • ๐Ÿ”ตAdd History Game
          • ๐Ÿ”ตAdd Promo Item
          • ๐Ÿ”ตAdd Request Lobby List Filter
          • ๐Ÿ”ตAdvertise Game
          • ๐Ÿ”ตAssociate with Clan
          • ๐Ÿ”ตAttach Leaderboard UGC
          • ๐Ÿ”ตBegin Auth Session
          • ๐Ÿ”ตCancel Auth Ticket
          • ๐Ÿ”ตCheck Result Steam ID
          • ๐Ÿ”ตClear All Key Values
          • ๐Ÿ”ตClear Achievement
          • ๐Ÿ”ตClear Rich Presence
          • ๐Ÿ”ตClient Initialize
          • ๐Ÿ”ตClient Run Callbacks
          • ๐Ÿ”ตClient Should Restart
          • ๐Ÿ”ตCompue New Player Compatibility
          • ๐Ÿ”ตConsume Item
          • ๐Ÿ”ตCreate Lobby
          • ๐Ÿ”ตDecompress Voice
          • ๐Ÿ”ตDelete Lobby Data
          • ๐Ÿ”ตDeserialize Result
          • ๐Ÿ”ตDestroy Result
          • ๐Ÿ”ตDownload Leaderboard Entries
          • ๐Ÿ”ตDownload Leaderboard Entries for Users
          • ๐Ÿ”ตEnd Auth Session
          • ๐Ÿ”ตExchange Items
          • ๐Ÿ”ตFind Leaderboard
          • ๐Ÿ”ตFind or Create Leaderboard
          • ๐Ÿ“‚Game Server Browser
            • ๐Ÿ”ตPing Server
            • ๐Ÿ”ตPlayer Details
            • ๐Ÿ”ตRequest Server List
            • ๐Ÿ”ตServer Rules
          • ๐Ÿ”ตGenerate Items
          • ๐Ÿ”ตGet Achievement
          • ๐Ÿ”ตGet Achievement by Index
          • ๐Ÿ”ตGet Achievement Icon
          • ๐Ÿ”ตGet Achievement Is Achieved
          • ๐Ÿ”ตGet All Items
          • ๐Ÿ”ตGet App Build ID
          • ๐Ÿ”ตGet App Id
          • ๐Ÿ”ตGet App Owner
          • ๐Ÿ”ตGet Auth Session Ticket
          • ๐Ÿ”ตGet Auth Ticket for Web API
          • ๐Ÿ”ตGet Available Game Languages
          • ๐Ÿ”ตGet Available Voice
          • ๐Ÿ”ตGet Coplay Friends
          • ๐Ÿ”ตGet Current Beta Name
          • ๐Ÿ”ตGet Current Game Language
          • ๐Ÿ”ตGet DLC Count
          • ๐Ÿ”ตGet DLC Data By Index
          • ๐Ÿ”ตGet DLC Download Progress
          • ๐Ÿ”ตGet Earliest Purchase
          • ๐Ÿ”ตGet Favorite Game
          • ๐Ÿ”ตGet Friends
          • ๐Ÿ”ตGet Friend Coplay Game
          • ๐Ÿ”ตGet Friend Coplay Time
          • ๐Ÿ”ตGet Friend Count from Source
          • ๐Ÿ”ตGet Friend Game Played
          • ๐Ÿ”ตGet Friend Groups
          • ๐Ÿ”ตGet Friend Group Members
          • ๐Ÿ”ตGet Friend Group Name
          • ๐Ÿ”ตGet Friend Persona Name
          • ๐Ÿ”ตGet Followed
          • ๐Ÿ”ตGet Installed Depots
          • ๐Ÿ”ตGet Item Definition Properties
          • ๐Ÿ”ตGet Item Price
          • ๐Ÿ”ตGet Items with Price
          • ๐Ÿ”ตGet Items by ID
          • ๐Ÿ”ตGet Launch Command Line
          • ๐Ÿ”ตGet Launch Query Param
          • ๐Ÿ”ตGet Leaderboard Display Type
          • ๐Ÿ”ตGet Leaderboard Entry Count
          • ๐Ÿ”ตGet Leaderboard Name
          • ๐Ÿ”ตGet Leaderboard Sort Method
          • ๐Ÿ”ตGet Lobby Chat Entry
          • ๐Ÿ”ตGet Lobby Data
          • ๐Ÿ”ตGet Lobby Data by Index
          • ๐Ÿ”ตGet Lobby Game Server
          • ๐Ÿ”ตGet Lobby Members
          • ๐Ÿ”ตGet Lobby Member by Index
          • ๐Ÿ”ตGet Lobby Member Data
          • ๐Ÿ”ตGet Lobby Member Limit
          • ๐Ÿ”ตGet Lobby Owner
          • ๐Ÿ”ตGet Most Achieved Achievement Info
          • ๐Ÿ”ตGet My Steam Avatar
          • ๐Ÿ”ตGet My Steam ID
          • ๐Ÿ”ตGet My Steam Level
          • ๐Ÿ”ตGet Num Items with Price
          • ๐Ÿ”ตGet Persona Name
          • ๐Ÿ”ตGet Persona State
          • ๐Ÿ”ตGet Player Nickname
          • ๐Ÿ”ตGet Public IP
          • ๐Ÿ”ตGet Result Item Property
          • ๐Ÿ”ตGet Result Items
          • ๐Ÿ”ตGet Result Status
          • ๐Ÿ”ตGet Result Timestamp
          • ๐Ÿ”ตGet Stat
          • ๐Ÿ”ตGet Steam ID
          • ๐Ÿ”ตGet User Achievement
          • ๐Ÿ”ตGet User Float Stat
          • ๐Ÿ”ตGet User Int Stat
          • ๐Ÿ”ตGet User Restrictions
          • ๐Ÿ”ตGet Rich Presence
          • ๐Ÿ”ตGet User Rich Presence
          • ๐Ÿ”ตGet User Rich Presence Key by Index
          • ๐Ÿ”ตGet User Steam Avatar
          • ๐Ÿ”ตGet Voice
          • ๐Ÿ”ตGet Voice Optimal Sample Rate
          • ๐Ÿ”ตGrant Promo Items
          • ๐Ÿ”ตHas Friend
          • ๐Ÿ”ตId is Me
          • ๐Ÿ”ตId is Valid
          • ๐Ÿ”ตIndicate Achievement Progress
          • ๐Ÿ”ตInstall DLC
          • ๐Ÿ”ตInvite User To Game
          • ๐Ÿ”ตInvite User to Lobby
          • ๐Ÿ”ตInitialize
          • ๐Ÿ”ตIs App Installed
          • ๐Ÿ”ตIs Behind NAT
          • ๐Ÿ”ตIs Cybercafe
          • ๐Ÿ”ตIs DLC Installed
          • ๐Ÿ”ตIs Lobby Owner
          • ๐Ÿ”ตIs Low Violence
          • ๐Ÿ”ตIs Phone Identifying
          • ๐Ÿ”ตIs Phone Requiring Verification
          • ๐Ÿ”ตIs Phone Verified
          • ๐Ÿ”ตIs Steam Initialized
          • ๐Ÿ”ตIs Subscribed
          • ๐Ÿ”ตIs Subscribed App
          • ๐Ÿ”ตIs Subscribed from Family Sharing
          • ๐Ÿ”ตIs Subscribed from Free Weekend
          • ๐Ÿ”ตIs Timed Trial
          • ๐Ÿ”ตIs Two Factor Enabled
          • ๐Ÿ”ตIs VAC Banned
          • ๐Ÿ”ตJoin Lobby
          • ๐Ÿ”ตLeave Lobby
          • ๐Ÿ”ตLoad Item Definitions
          • ๐Ÿ”ตLogged On
          • ๐Ÿ”ตLog Off
          • ๐Ÿ”ตLog On
          • ๐Ÿ”ตLog On Anonymous
          • ๐Ÿ”ตMark Content Corrupt
          • ๐Ÿ”ตQuick Match
          • ๐Ÿ”ตRemove Favorite Game
          • ๐Ÿ”ตRemove History Game
          • ๐Ÿ”ตRemove Property
          • ๐Ÿ”ตReply to Friend Message
          • ๐Ÿ”ตRequest Current Stats
          • ๐Ÿ”ตRequest Eligible Promo Item Definitions IDs
          • ๐Ÿ”ตRequest Friend Rich Presence
          • ๐Ÿ”ตRequest Lobby Data
          • ๐Ÿ”ตRequest Lobby List
          • ๐Ÿ”ตRequest Prices
          • ๐Ÿ”ตRequest Store Auth URL
          • ๐Ÿ”ตRequest User Group Status
          • ๐Ÿ”ตRequest User Information
          • ๐Ÿ”ตRequest User Stats
          • ๐Ÿ”ตReset All Stats
          • ๐Ÿ”ตRun Callbacks
          • ๐Ÿ”ตSecure
          • ๐Ÿ”ตSend Lobby Chat
          • ๐Ÿ”ตSerialize Result
          • ๐Ÿ”ตSet Achievement
          • ๐Ÿ”ตSet Advertise Server Active
          • ๐Ÿ”ตSet Bot Player Count
          • ๐Ÿ”ตSet Dedicated Server
          • ๐Ÿ”ตSet Description
          • ๐Ÿ”ตSet Game Data
          • ๐Ÿ”ตSet Game Tags
          • ๐Ÿ”ตSet In-Game Voice Speaking
          • ๐Ÿ”ตSet Key Value
          • ๐Ÿ”ตSet Map Name
          • ๐Ÿ”ตSet Listen for Friends Messages
          • ๐Ÿ”ตSet Lobby Data
          • ๐Ÿ”ตSet Lobby Game Server
          • ๐Ÿ”ตSet Lobby Joinable
          • ๐Ÿ”ตSet Lobby Member Data
          • ๐Ÿ”ตSet Lobby Member Limit
          • ๐Ÿ”ตSet Lobby Owner
          • ๐Ÿ”ตSet Lobby Type
          • ๐Ÿ”ตSet Max Player Count
          • ๐Ÿ”ตSet Mod Directory Name
          • ๐Ÿ”ตSet Name
          • ๐Ÿ”ตSet Password Protected
          • ๐Ÿ”ตSet Persona Name
          • ๐Ÿ”ตSet Played with User
          • ๐Ÿ”ตSet Product
          • ๐Ÿ”ตSet Property
          • ๐Ÿ”ตSet Region
          • ๐Ÿ”ตSet Rich Presence
          • ๐Ÿ”ตSet Stats
          • ๐Ÿ”ตSet Spectator Name
          • ๐Ÿ”ตSet Spectator Port
          • ๐Ÿ”ตSet User Achievement
          • ๐Ÿ”ตSet User Float Stat
          • ๐Ÿ”ตSet User Int Stat
          • ๐Ÿ”ตShutdown
          • ๐Ÿ”ตStart Purchase
          • ๐Ÿ”ตStart Update Property
          • ๐Ÿ”ตStart Voice Recording
          • ๐Ÿ”ตSteam ID Tools
          • ๐Ÿ”ตStop Voice Recording
          • ๐Ÿ”ตStore Stats
          • ๐Ÿ”ตStore User Stats
          • ๐Ÿ”ตSubmit Update Property
          • ๐Ÿ”ตTransfer Item Quantity
          • ๐Ÿ”ตTrigger Item Drop
          • ๐Ÿ”ตUninstall DLC
          • ๐Ÿ”ตUpdate Avg Rate Stat
          • ๐Ÿ”ตUpdate User Avg Rate Stat
          • ๐Ÿ”ตUpload Leaderboard Score
          • ๐Ÿ”ตUser Has License for App
          • ๐Ÿ”ตWas Restart Requested
        • Events
          • ๐Ÿ”ปDlc Installed
          • ๐Ÿ”ปFriend Chat Msg
          • ๐Ÿ”ปFriend Rich Presence Update
          • ๐Ÿ”ปGame Overlay Activated
          • ๐Ÿ”ปInventory Item Definition Update
          • ๐Ÿ”ปInventory Results Ready
          • ๐Ÿ”ปLobby Chat Msg
          • ๐Ÿ”ปLobby Chat Update
          • ๐Ÿ”ปLobby Data Update
          • ๐Ÿ”ปLobby Game Created
          • ๐Ÿ”ปLobby Join Requested
          • ๐Ÿ”ปMicro Txn Authorization Response
          • ๐Ÿ”ปPersona State Change
          • ๐Ÿ”ปRich Presence Join Requested
          • ๐Ÿ”ปServers Connected
          • ๐Ÿ”ปServer Connect Failure
          • ๐Ÿ”ปServer Disconnected
          • ๐Ÿ”ปTicket for Web API Response
        • Types
          • ๐ŸŸฉAchievement Status
          • ๐ŸŸฉAuth Ticket Data
          • ๐ŸŸฉChat Entry
          • ๐ŸŸฉDecompress Voice Result
          • ๐ŸŸฉFloat Stat
          • ๐ŸŸฉGame Server Item Wrapper
          • ๐ŸŸฉGame Server Player Details Wrapper
          • ๐ŸŸฉGlobal Achievement Status
          • ๐ŸŸฉItem Count
          • ๐ŸŸฉItem Detail
          • ๐ŸŸฉItem Detail With Properties
          • ๐ŸŸฉItem Price
          • ๐ŸŸฉItem With Price
          • ๐ŸŸฉInt Stat
          • ๐ŸŸฉKey Value Pair
          • ๐ŸŸฉLeaderboard Entry
          • ๐ŸŸฉLobby Data
          • ๐ŸŸฉLobby Game Server
          • ๐ŸŸฉServer Achievement Status
          • ๐ŸŸฉServer Stat Float Value
          • ๐ŸŸฉServer Stat Int Value
          • ๐ŸŸฉUser Achievement Status
          • ๐ŸŸฉVoice Result
          • ๐ŸŸฉVoice Available Result
        • Enumerators
          • ๐ŸŸจUEBeginAuthSessionResult
          • ๐ŸŸจUEChatRoomEnterResponse
          • ๐ŸŸจUEFriendFlags
          • ๐ŸŸจUEChatEntryType
          • ๐ŸŸจUEChatMemberStateChange
          • ๐ŸŸจUELeaderboardDataRequest
          • ๐ŸŸจUELeaderboardDisplayType
          • ๐ŸŸจUELeaderboardSortMethod
          • ๐ŸŸจUELobbyComparison
          • ๐ŸŸจUELobbyDistanceFilter
          • ๐ŸŸจUELobbyType
          • ๐ŸŸจUEResult
          • ๐ŸŸจUESteamCurrencyCode
          • ๐ŸŸจUEServerMode
          • ๐ŸŸจUEUserHasLicenseForAppResult
          • ๐ŸŸจUEVoiceResult
      • C++
  • Toolkit for Physics
    • Unity
      • Installation
      • Core Features
        • Ballistics Tools
        • Buoyancy Tools
        • Force Effect Framework
        • Physics Data extended
        • Verlet Integration
      • Sample Scenes
        • Fantasy Style Ballistic Simulation
        • (3D) Deterministic Bounce Prediction
        • (2D) Deterministic Bounce Prediction
        • 1 Buoyancy Example
        • 1 Force Effect Fields
        • 2 Spherical Gravity
        • 3 Multi-body Gravity
        • 1 Verlet Spring Simple Transforms
        • 2 Verlet Spring Skinned Mesh
      • API
        • Ballistics
        • Buoyancy
        • Force Effects
        • Maths
        • Mesh Tools
      • Components
        • Ballistic Aim
        • Ballistic Path Line Render
        • Ballistic Path Follow
        • Buoyant Body
        • Buoyant Body Drag
        • Constant Acceleration
        • Constant Angular Velocity
        • Constant Linear Velocity
        • Force Effect Source
          • Force Effect Direction
          • Force Effect Field
        • Force Effect Reciever
        • Physics Data
        • Surface Tool
        • Trick Shot
        • Trick Shot Line
        • Verlet Spring
      • Objects
        • Force Effect
          • Attract Effect
          • Gravity Effect
          • Repulse Effect
          • Suspend Effect
          • Tractor Effect
          • Wind Effect
        • Point Volume
        • Verlet Hierarchy
        • Verlet Hierarchy Settings
        • Verlet Particle
      • Enums
        • Calculation Mode
  • Toolkit for UI & UX
    • Introduction
    • Unity
      • Installation
      • Learning
        • Sample Scenes
          • Command Parser Example
          • Cursor System Scene
          • Drag and Drop (Behaviours)
          • Drag and Drop (Inventory Example)
          • Drag and Drop (Spell Bar Example)
          • Log Sample Scene
          • Screenshot Sample Scene
        • Core Concepts
          • Command System
          • Cursor System
          • Drag and Drop System
          • Interaction Tools
          • Logging & Feedback
          • Scene Tools
          • Selection System
          • Tooltip System
          • Window System
        • uGUI Extras
          • Key Collection
          • Ligature Tools
          • Tree View Collection
      • API
        • Cursors
        • Json
        • Log
        • Scenes
        • Screenshot
        • Selection
        • Trello
        • Windows
      • Components
        • Action Hold
        • Border Handle
        • Button Cursor State
        • Change Cursor Default State
        • Command Director
        • Cursor Animator
        • Drag Item
        • Drop Container
        • Key Hold
        • Mouse Over Cursor State
        • Move Handle
        • Play On Click
        • Play On Demand
        • Play On Down
        • Play On Enter
        • Play On Exit
        • Play On Up
        • Pointer Hold
        • Scenes Manager
        • Selectable Object
        • Selection Manager
        • Tooltip Trigger
        • Tooltip Window Controller
        • Window
        • Window Clamping Bounds
        • Window Focus Change Event Data
      • Objects
        • Command Data
        • Command Library
        • Cursor Animation
        • Cursor State
        • DragAndDropItemChangeData
        • LogData
      • Enums
        • Clear Drop Behaviour
        • Drag Effect
        • Drag End Behaviours
        • Grab Handle
        • Mask Mode
        • Recieve Mode
        • Window Snap To Location
  • More Heathen Tools
    • ๐ŸŽจArt Assets
      • Breakable
        • Wood Props
          • Installation
    • โš™๏ธSystem Core
      • Installation
      • Learning
        • Asset Developers
      • Command Line
      • Game Events
      • Scriptable Tags
      • Scriptable Variables
      • Heathen Behaviour
      • Heathen UI Behaviour
    • ๐Ÿ“‹Tips for Asset Developers
      • Editor Coroutines
      • Package Manger in C#
      • Session State Values
  • Codex
    • Introduction
      • Article Design Guide
        • Evolution
          • Early Period
          • Middle Period
          • Late Period
      • Codex Organization
    • Irish
      • Folklore
        • Introduction
        • Characters
          • Dรฉithe
            • Cacht
            • Lugh
            • Dag Dia
              • Donn
              • Nuada
              • Ogma
            • Mother?
              • Banba
                • Appearance
                • Name
              • ร‰rui
                • Appearance
                • Name
              • Fรณdla
                • Appearance
                • Name
            • Father ?
              • ร‰thur Mac Cuill
              • Cรฉthur Mac Grรฉine
              • Tรฉthur Mac Cecht
        • Concepts
          • Binding Tablet
          • Druids
          • Sociaty
          • Patron Gods
          • Bile
          • Time
        • Food
          • Elderberry Capers
          • Elderberry Wine
          • Mead
        • Peoples
          • Fomรณire
          • Research Note
            • Hunter Gathers
            • Neolithic Farmers
            • Bronze Age
        • Locations
          • Lughmhagh
          • Temair
            • Name
      • Research
        • Historical Backdrop
        • Disambiguation
          • Banshee
          • Celt
          • Gods and Goddesses
          • Lebor Gabรกla ร‰renn
          • Milesians
          • Mother Goddess
          • Sovereignty Goddess
          • The Morrรญgan
          • Triple Persona
          • Tuatha Dรฉ
          • Wicker Man Sacrafice
        • Links
          • Social Factors
          • Lugh
            • Name
          • Ogma
          • Astronomy
          • Time
        • Sources
        • WIP
          • Artefacts
          • Beings
            • Cannon
              • Belgae
              • Fomorians
              • Sรญog
              • Tuatha Dรฉ Danann
            • Derivative
              • Milesians
              • Muintir Nemid
          • Characters
            • Cannon
            • Derivative
          • Concepts
          • Events
          • Languages
          • Music
          • Places
          • Sources
          • Stories
          • Styles
Powered by GitBook
On this page
  • Introduction
  • Benefits
  • Remove Singleton Dependency
  • Reduce Data Duplication
  • Cross Scene Referencing
  • Always Available
  • Change Event
  • Seemless Editor Integration
  • Custom Variables
  • Initalize References to a value
  • Default Reference to Varaible mode
  • Get Varaible Values
  • Set Variable Values
  • Understanding Change Events
  • Listening for Change
  • Remove Listeners
  1. More Heathen Tools
  2. System Core

Scriptable Variables

System Core Scriptable Variables

PreviousScriptable TagsNextHeathen Behaviour

Last updated 1 year ago

Like what your seeing?

Support us as a and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our ... become a sponsor today!

Introduction

Scriptable Variables allow you to define data points as assets in your project. In short you can define floats, strings, bools or even custom data types (classes or structures) as scriptable objects in your asset folder. This then opens up many possibilities from an architectural point of view.

Benefits

Unity 2017 had a great talk on this subject and goes deep into the reasons you should avoid the singleton model, and more importantly what the benefits of Scriptable Objects are over singleton and other approaches.

Remove Singleton Dependency

The singleton model is a common approach in Unity game development however it is fraught with issues. Singleton dependency that is when one object is dependent on the state of another objectโ€™s singleton value (its static attribute) creates hard to trace errors due to null reference exceptions, it creates deep dependency between objects making unit testing difficult or often impossible and can lead to access issues by creating a logical path of reference beyond the scope that would normally be permitted.

Scriptable Variables remove the need for most if not all singletons by storing the data in a mutually accessible location (the Scriptable Variable). Take for example โ€œPlayer Healthโ€ your player character will need to know about this as will your Player UI. You could define the data on Player Character, make that a singleton and have the Player UI use that. Doing that will create a dependency between Player Character and Player UI. It also means that Player UI can now execute methods on Player Character as it has a reference to it, this encourages bad design, creates dependency that means Player UI cannot be tested with out Player Character and means that both Player Character and Player UI must be defined in the same scene or referenced at run time with a costly lookup.

Using Scriptable Variable, you could define Player Health as a variable in your asset database and have both Player Character and Player UI reference that variable. Now neither the character nor the UI is aware of the other. They can be defined in separate scenes and even in multiple scenes. More importantly the Scriptable Variable will report when its data has changed so you donโ€™t need to use an Update loop to react to data change you could choose to use an event-based approach.

Reduce Data Duplication

Another common issue in game data models is the duplication of data; that is we often see common values such as player health, the current state of UI, etc, needing to be calculated multiple times in multiple places or worse yet being stored in multiple places and needing to be synchronized when change occurs.

A common example of this might be player UI colour preference. You could store this value on each UI controller that needs to use it and thus when this value changes you need to go out and update all references to it. Alternatively, you could use a singleton to hold the value, but this then creates a large and wide reaching dependency chain that will make unit testing difficult if not impossible. Finally, you could create a system to look this value up such as to read it from app settings or similar, this however incurs processing overhead for everything that uses it and thus does not scale well at all.

There are other approaches but none as simple, efficient, and robust as simply having all objects that need it reference the same bit of data without creating dependency between disparate systems or requiring run time look up due to multi-scene setups. This is where Scriptable Variables come in. You can define such global or common data points as Scriptable Variables and reference them cross scene, respond to change events and ensure that there is no duplication of this data and that all users of the data are aware of the latest value all the time.

Cross Scene Referencing

Can be easily referenced cross scene resolving a common problem with multi-scene game structures. In a multi-scene game, one often runs into the issue that Unityโ€™s editor cannot resolve references between scenes that is you cannot reference an object in Scene A from Scene B at dev time. This limitation is not applied to Scriptable Objects because they are defined in the Asset Database and are thus always โ€œin scopeโ€.

Always Available

Can always be accessed, unlike a singleton game object structure there is no need to wait for initialization with a Scriptable Variable. The reference is available from the moment the game is loaded into memory. This is contrast to the singleton model; in a singleton model you create a static variable on your game object that gets set on Start of that object which means the period of time between initialization of the game and the start of that object the variable is null.

Change Event

Heathen Engineeringโ€™s take on Scriptable Variable is to derive them from GameEvent<T> this means that every Scriptable Variable is also a change event for the same type of data. As a result of this design you can receive change notification for any data type whos change is applied through the data field of the variable e.g.

This means for example you could drive the change of a player health bar by change event as opposed to updating every frame saving processing time.

You can create complex Scriptable Variables which represent reference types of data vs value types of data. As such you must be aware that the change event can only trigger if it can detect a change in data e.g. when you set the value via the Variable.Value field or via the Varaible.SetValue(value) method.

Seemless Editor Integration

Heathen's approach to Scriptable Variable referencing means your designers can choose rather they use a reference to a Scriptable Variable enter a constant value in the inspector. By using the FloatReference data type we can let the designer choose if they use a Scriptable Varaible or if they use a constant value.

Take the example below. oldWay is a float attribute and can only be typed in as a constant value in the inspector. betterWay is a FloatReference and so the designer can choose to type in a constant value or can change the mode to variable and reference a Scriptable Variable of type Float.

public class Example : MonoBehaviour
{
    public float oldWay;
    public FloatReference betterWay;
}

Using the menu button to the left of the input field the designer can change the mode of Better Way

Custom Variables

Heathen's System Core is designed to be extended, you can easily create custom variable types. The standard System Core comes with common data types already defined e.g. float, int, double, vectors of various types and more. You can however create your own including composite variable types - That is types that store complex data not just single values.

Lets assume we have a complex data model such as

[Serializable]
public class ExampleCompositData
{
    [Serializable]
    public class MoreComplexData
    {
        public float anotherFloat;
        public bool someBool;
    }

    public float someFloat;
    public string someString;
    public int someInt;
    public MoreComplexData moreData;
}

If so then we can define a Scriptable Variable that handles this data type as

[CreateAssetMenu(menuName = "System Core/Variables/Custom/Example Composit Data")]
public class ExampleCompositDataVaraible : DataVariable<ExampleCompositData>
{ }

Note that we don't need to populate the body of this class, the base class DataVariable<T> handles all the logic needed. We do however need to give it a unique CreateAssetMenu name so that we can create it from the Create menu in the Unity Editor.

Next we need to create the Reference this is an optional step, if we want to insist that this data type is always used from a Scriptable Variable and never used as a constant then we can skip this step however if we want to let the designer choose if they type the value in manually in the inspector or if they reference a variable then we need to create a VariableReference<T> for the type.

[Serializable]
public class ExampleCompositDataReference : VariableReference<ExampleCompositData>
{
    public ExampleCompositDataVaraible Variable;

    public override IDataVariable<ExampleCompositData> m_variable => Variable;

    public ExampleCompositDataReference(ExampleCompositData value) : base(value)
    { }
}

Here we are creating the reference type. You can of course use a shorter name ๐Ÿ˜Š the long name here is just for our example.

Once this is done you can create a reference field for this type via

public class Example : MonoBehaviour
{
    public ExampleCompositDataReference complexData;
}

In the inspector that will look like this

If you wanted to insist that its a variable e.g. not let your designers choose then change the code to use the variable as opposed to the reference

public class Example : MonoBehaviour
{
    public ExampleCompositDataVaraible complexData;
}

Notice that there is no menu button, the designer is thus forced to use a variable of this object.

Initalize References to a value

public FloatReference dataVariable = new FloatReference(42f);

Use the new keyword to use the default constructor and set the constant value as desired.

Default Reference to Varaible mode

public FloatReference dataVariable = new FloatReference(0f) 
    {
        Mode = VariableReferenceType.Referenced 
    };

Using the new keyword to construct the value on initialization. You can also set any of the members to any value that can be defined at compile time .e.g you can set the Mode to Referenced.

Note we are passing in a default constant value in this case as the constructor requires an initialization value. The field will be set to variable mode in the inspector.

Get Varaible Values

dataVariable.Value

You can access the value of a variable through its Value field.

Set Variable Values

dataVariable.Value = value;

You can set the value of a variable through its Value field. If this value is new it will cause the change event to be raised/invoked.

Understanding Change Events

All Scriptable Variables are also change events of the same data type; this means you can listen for change of the underlying data assuming of course that data is changed via the Value or SetValue methods.

Using the example above as a data type note that the following code will raise the change event

complexData.Value = new ExampleCompositData() { ... };

//or

complexData.SetValue(new ExampleCompositData() { ... });

And this following code will not raise the change event

complexData.Value.someFloat = 42f;

But Why?

Because in the second example the value of the variable's Value attribute did not change, its still pointing to the same object in memory, you simply changed a member of that object's data not the object its self.

In the first example we actually set the Value attribute of the variable to a new / different object thus the Value did change and the event gets raised.

Raise on member change

If you want to have the change event raise on the change of a member you need to do so manually.

complexData.Value.someFloat = 42f;
complexData.Raise(this, complexData.Value)

Note you cant simply set the Value to its self, the system does check for equality before raising e.g.

complexData.Value.someFloat = 42f;
complexData.SetValue(complexData.Value)

The above will never cause the change event to raise

Listening for Change

Variables work like UnityEvents, simply add a listener

public void Foo()
{
    complexData.AddListener(HandleChange);
}

private void HandleChange(EventData<ExampleCompositData> data)
{
    //DO WORK
}

Remove Listeners

Variables work like UnityEvents, simply remove the listener

public void Foo()
{
    complexData.RemoveListener(HandleChange);
}
โš™๏ธ
GitHub Sponsor
GitHub Sponsors
Better Way is set to Constant
Better Way is set to Variable
Complex Data is set to Constant mode
Complex Data is set to Variable mode
Variable type, has no menu button