Home
About us
Documentation
Français
Details
Items
class ItemData : ScriptableObject
Static information, references about the item, easy to edit
→ Information stored can be an icon, damages, animations, …
⚠️ It's impossible to code runtime methods in ScriptableObject, because 2 identical ItemData will have the same reference, meaning the same variables values (Methods will do things for every same items at once, instead of just 1 item)
class ItemBehavior
Runtime methods for item instances
Uses NetworkBehavior in order to be able to program RPC netcode methods
Example of behaviors:
Throwable Items
Placeable Items
Drone controls
→ Receives inputs from CharControls or Ai Scripts
→ Constructor requires: ItemData, mesh instances (left & right), entity
class ItemBehaviorHandler : NetworkBehavior
Runtime methods for persistent item instances and network behaviors
Individual for each entities
→ Handles replication (eg: throwing grenades)
→ Permanent effect (eg: night vision goggles)