Animal Controller
📥 Integrations📑 Changelog✅Social
  • 🤝Welcome to Malbers Animations Assets
  • 🌐Discover all my Assets
  • 💫What's New
  • 🌀Upcoming assets
  • 📋Changelog
  • ↗️Upcoming Changelog
  • 🛣️Road Map
  • ✍️End User Licence Agreement
  • 🌟Features
  • Improve Performance Tricks
  • 😓Know Limitations so far
  • 📥Downloads
  • QuickStart
    • 📖Guide to use All Malbers Assets with (AC)
    • 🔼Upgrade to URP
    • 🔼Upgrade to HDRP
    • 💔Common Issues
    • 🔔Tips and Tricks
  • Guides and Tutorials
  • 📺YouTube Tutorials
    • 📺Video Tutorials (On Queue)
  • 📱Mobile Setup Guide
    • Mobile Joystick
  • 🧐How to: Animal Controller
    • 🔹Play a Mode while Moving
    • 🔹Create and configure a new mode
    • 🔊Adding Sound Effects
    • 🔹Rebone Mesh Tutorial (Skin Mesh is Missing)
    • 🔹Add Movement with Non RootMotion Animations
    • 🔹Fetch a ball
    • 🔹Set up Timeline
    • 🔹Make Animal flee when see the animal Player
    • 🔹Animal Controller for Humanoids
    • Create a Shootable Weapon From Scratch
    • ⚔️How to Fix weapons offset and values (Bow, Pistol)
    • ✨Add a Effect to the Effect Manager
    • 🕹️Connect Inputs to the Controller
    • Modify the controller with a Stat
    • Use the Modify Stat Component
    • 📡Use a MEvent and MEvent Listeners
    • 💎Change from Faceted to Smooth poly art Animals
    • ⁉️Listen when an Mode starts or ends
  • 🐎How to: Horse Animset Pro
    • 🐴Call the Mount
    • 🤠Change Meshes for the Rider
    • 🏇Make any animal mountable
  • 🕺Strafing
  • Main Components
    • 🐺MAnimal Controller
      • General
        • Pivots
      • Speeds
      • 🔷States
        • 🕴️Idle
        • 🏃‍♂️Locomotion
        • 🌠Fall
        • 🤾‍♀️Basic Jump
        • 🤾‍♂️Root Motion Jump
        • 🐟Swim
        • 🐊UnderWater
        • 🧗‍♂️Climb
        • 🧗‍♂️Ledge Grab
        • 🦅Fly
        • 🪂Glide
        • 🧗Wall Run
        • 🧗Wall Run Vertical
        • ⛷️Slide
        • ☠️Death
        • ☠️Death Ragdoll
        • 🆕Creating a new State
      • 🟩Modes
        • 🟩Mode Behavior
        • 🟩Mode Sequence
      • 🅾️Stances
      • Advanced
      • Animal Modifiers
      • Events
      • Debug
      • Animal Animator Behaviors
      • Methods and Properties
    • 🎮Malbers Input & MInput
      • Methods and Properties
    • 🤖AI
      • AI Animal Control
      • MWayPoint
      • Wander Area
      • AI Target
      • Animal Brain
        • AI States
        • Tasks
          • General - Chance
          • General - Empty
          • General - Invoke Event
          • General - Send Message
          • General - Play Audio
          • General - Quick Align
          • General - Reaction
          • General - Set Look At Aim
          • General - Set Stat
          • General - Wait
          • Animal - Set Speed
          • Animal - Play Mode
          • Animal - Set/Play State
          • Animal - Set Stance
          • Animal - Set Strafe
          • Movement - Move Stop
          • Movement - Patrol
          • Movement - Set Destination
          • Movement - Set Target
          • Variables - Set Var Listener
          • Weapons - Weapon Tasks
        • Decisions
          • General - AND
          • General - Check Stat
          • General - Compare Stats
          • General - Look
          • General - OR
          • General - Is Task Done?
          • General - Wait
          • Movement - Has Arrived
          • Movement - Check Target
          • Animal - Check Mode
          • Animal - Check Stance
          • Animal - Check State
          • Variables - Check Scriptable Variable
          • Variables - Check Transform Var
          • Variables - Check Var Listener
          • Runtime Set - Is Target in Runtime Set
      • 📌Point Click
    • 🧨Reactions
    • 📶Combo Manager
    • ⚔️Weapon Manager
      • 🛡️MWeapon [General] Properties
      • 🛡️MWeapon [Damage] Properties
      • 🛡️MWeapon [IK] Properties
      • ⚔️MMelee
      • 🔫MShooteable
      • 🏹Bow
    • 〰️Path Constraint
      • 〰️MPath
      • 〰️Path Link (Straight)
      • 〰️Path Link (Cinemachine Path)
      • 〰️Path Creator(Sebastian Lague)
    • Speed Ground Changer
  • Scriptable Architecture
    • 💠Scriptables
      • 🔹Bool Var
      • 🔹Int Var
      • 🔹Float Var
      • 🔹String Var
      • 🔹ValueToString
      • 🔢Variable Listeners & Comparers
      • 🔰IDs
      • 🎫Tags
      • 🪝Transform Hook
      • 📣MEvents
      • 📣MEvent Listener
      • 📦Runtime gameobjects
    • 🔤MLocal Variables
  • Secondary Components
    • ⚔️MDamager
      • 🐾MAttack Trigger
      • 🐾Attack Trigger Behavior
      • 🏉MProjectile
      • 🏹Projectile Thrower
      • 🤯MExplosion
    • 🤕MDamageable
    • 🧊Zones
      • Public Methods
    • ✊Pick Up - Drop
    • ✊Pickable
    • 🚩Respawner
    • 🚩Respawner NPC
    • 🚩Simple Respawner
    • 🏁CheckPoint
    • IK Manager
      • IK Processors
      • Weight Processors
  • Global Components
    • 🧡Stats
      • 🔸Stat Modifier
      • 🔸Modify Stat <Component>
      • 🔸Modify Stat <Asset>
      • 👨‍💻Public Methods
    • Animator Behaviours
      • Message Behaviour
      • Random Behaviour
      • Is Kinematic Behaviour
      • Sound Behaviour
      • Rigid Constraint Behaviour
    • 🟩Trigger Proxy
    • 🔌Interactable
    • ⚡Interactor
    • ⁉️Conditions
    • 🎥Free Look Camera
    • 🎥Cinemachine
    • UI
      • Unity Utils
  • Riding System (HAP)
    • Horse Animset Pro (HAP) Riding System
    • The Art of (HAP)
    • Mount
      • Methods and Properties
    • MRider
      • Methods and Properties
    • Mount Triggers
    • Mount Points
  • Utilities
    • Material Changer
    • Active Meshes
    • Effect Manager
    • Effect Behavior
    • Animator Event Sounds
    • Blend Shapes
      • Blend Shape Preset
    • Look At
    • 🏹Aim
    • 🎯Aim Target
    • 🎯Lock On Target
    • 🐾Steps Manager
    • 🐾Step Trigger
    • 🔗Mode Align
    • 🔗Aligner
    • Component Selector
    • MAnimalAnimatorSync
    • Multiple Time Checker
    • MAnimalAnimatorSync
  • Annex
    • 🗃️Integrations
      • General HAP Integration
      • Rewired
      • Invector Templates
        • Invector Weapon Settings
      • Animals Controller + Invector
      • Ootii's Motion Controller
      • Opsive Ultimate Character Controller (UCC 3.03)
      • Opsive Ultimate Character Controller (UCC 3.08) Generic
      • AStar Pathfinding
      • Unity Input System (NEW)
        • New Input Link [Old Versions]
      • Game Creator
      • Game Kit Controller
    • Contact
    • 🤔FAQ
    • Refund Policy
  • Games using Malbers Animations
  • Interfaces
    • IAITarget
    • IWayPoint
    • IAIControl
    • IAim
    • IAlign
    • IGravity
    • IInteractor
  • ULTIMATE SELECTOR
    • Overview
    • Selector Manager
    • Selector Editor
    • Selector Controller
    • Selector Item
    • Selector UI
    • Selector Data
    • Changelog (Selector)
  • 🎒Malbers Inventory Add-On
    • Overview
      • Compatibility Matrix
      • Roadmap
      • Update Notes
  • Updating from v1.1.1 to v1.2 Instructions
  • Basic Setup Instructions
    • Creating a new Item
      • Adding Buffs/Debuffs to Items
      • Setting up Item Reactions
      • Custom Rarities
    • Setting up Item/Inventory Types
    • Set up the Pick/Drop Component
    • Setting up the Notifications
    • Setting up the Item Info panel
  • Inventory Set
    • Events
  • Inventory Master
  • Notification Manager
    • Notification Child
    • Events
  • Save/Load System
  • Item Spawner
  • Storage Chests
    • Chest Inventory
    • Chest Inventory UI
  • Using Armour
  • Shop System
    • Shop
    • Shop UI Manager
  • Cooking System
    • Create a new Recipe
  • UI Manager
  • Hotbar
Powered by GitBook
On this page
  • Overview
  • How to Set Up
  • How to Use the Cooking System

Was this helpful?

Cooking System

PreviousShop UI ManagerNextCreate a new Recipe

Last updated 1 year ago

Was this helpful?

Overview

The Cooking System, introduced in v1.3 is a simple yet robust system that allows the player to cook any item that they have a recipe for, and has the sub-type of food.

How to Set Up

Setting up the Cooking System is super easy.

  1. Inside of the InventorySystem -> Prefabs -> CookingPrefabs folder there will be a CookingUI Prefab. Drag this to your scene. It should already be set up with all the references required as they are all internal to the prefab itself.

  2. Create a new Recipe - Create a new Recipe

  3. Create a new Item for picking up the Recipe OR use code to add it to the inventory.

  4. Set up the Input for toggling on/off the Recipe List.

Let's break down these steps and do it one by one.

Step 1 - Drag the CookingUI Prefab to your Scene. This should be self explanatory.

Step 2 - Create a new Recipe.

Follow the steps in Create a new Recipe to do this.

Step 3 - Create a new Item that the player can pick up that holds the Recipe

Follow the steps in Creating a new Item to do this.

The only two differences are that you'll need to set the Sub-Type to "Recipe" and on the Reactions Tab, you also need to set a "Learn Recipe Reaction" ABOVE the Use item:

Step 4 - Set up the Input for Toggling On/Off the Recipe List

And that's it. That's the basic setup!

How to Use the Cooking System

If you've followed the basic set up, you should have at this point:

  • A Recipe Scriptable Object and Recipe Item Prefab (that you can pick up in the world!)

  • 3 new Item Scriptable Objects - One for Normal Cooked Items, and one for a Perfectly Cooked Item as well as one for your Recipe Item - your items should also have in-world prefabs for dropping/picking up scenarios.

  • Your CookingUI Prefab in Place

Once that's set up, lets put it into action.

Start by placing your Recipe Item Prefab somewhere in the world. For this example I'll be using the Baked Apple Recipe:

You'll notice that I've set the Inventory Item to the BakedAppleRecipe ITEM rather than the recipe, as the item will hold a reference to the recipe:

Next, when in Play Mode, when you go to pick up the item, it will be in the Inventory that you've specified as per the Type in the item.

As long as your Recipe Item has the Learn Recipe Reaction on it, you'll be able to Learn the Recipe:

In your Inventory, click on the Recipe and choose "Use" to Learn the Recipe

If notifications are turned on you'll get this notification:

Next, open up your Recipe List depending on whatever button you've set it to: "Set to L in the Demo Scene", then you'll see your recipe. As long as you have the corresponding items to create the new item, then you can cook it:

There is a cooking minigame included that you don't have to use if you don't want to: To use it, turn off the "Skip Cooking Minigame" bool toggle on the CookingUI -> Cooking Manager component:

If you use the minigame, perfect cook can be achieved via the players input. If you don't use it, it's instead determined by random chance.

The difficulty of the minigame is determined by the Difficulty setting on the Recipe Scriptable Object:

0 is Harder. 1 is Easier. The closer to 0 you go, the smaller the sweet spot will be, whereas the closer to 1 you go, the larger the sweet spot will be.