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
  • Pre-Requisites
  • Video Tutorial (For use with Inventory v2.0+):
  • Setup of the Inventory (Old Instructions for Anyone on a Lower Version than v2.0)
  • Inventory Master
  • Inventories
  • Buttons
  • Remove Event from PickUp/Drop Component (If needed)
  • Other Considerations
  • Opening/Closing the Inventory Screen
  • Disabling/Re-enabling the Cursor

Was this helpful?

Basic Setup Instructions

PreviousUpdating from v1.1.1 to v1.2 InstructionsNextCreating a new Item

Last updated 3 months ago

Was this helpful?

Setup for the Malbers Inventory Add-On is very simple.

Once imported, you will find various folders:

In order to use the inventory system, you will need to do the following:

Pre-Requisites

  • JSON.Net

  • Animal Controller

If you haven't already, download Animal Controller/HAP FIRST, then download the Inventory Add-On after.

If you haven't already got it installed, you will also need to install JSON.net. If you receive errors like the following then you need to do that:

It should install by default, but if not, go into your package manager, then press the Plus icon in the top left and choose: Add Package by Name.

The name you want to give is: "com.unity.nuget.newtonsoft-json".

It will then install JSON.Net:

Once everything is installed, you should now see it underneath your Malbers Animations -> Integrations folder.

NOTE - As of v2.0 Onwards, this should install automatically but if not, please check above

Video Tutorial (For use with Inventory v2.0+):

Setup of the Inventory (Old Instructions for Anyone on a Lower Version than v2.0)

In the prefabs folder, you will find various prefabs. There will be one called InventoryCanvas. Drag this into your scene. The Inventory Canvas is a standard canvas that uses Screen-Space Overlay.

By default, all of the child objects will be set to inactive as per the screenshot below (we will sort that shortly!):

This prefab sets up a standard 4 x 4 grid for your inventories using 16 slots. Each slot that is added will automatically be generated an ID number at runtime. It's important to NOT edit these ID numbers. If you want a larger inventory, just add more Slot prefabs and the system will automatically find them and give them an ID.

As children of the InventoryUI gameobject, you will find all of your slots. Each slot should have an Inventory Slot script attached, as well as a Grid Layout Group:

The grid layout group is what handles snapping the item back into place when you remove it from a slot but don't assign it a new slot. Do not remove it.

You should also find an InfoPanel gameobject, as well as a InventoryTabsArea gameobject and a OtherButtons gameobject.

The InfoPanel is what is shown to the player when you hover over an item - like a tooltip.

The OtherButtons is the panel where all of your functional buttons are such as: Equip, Use, Unequip etc.

The InventoryTabsArea are where the individual Inventory Tabs are, and underneath them are your individual inventories.

Inventory Master

Set up the General Tab as shown in the screenshot where the Steve Animal is your own that you are using with the Inventory system via using a TransformVar. For now, leave notifications and save system encryption turned off as we'll cover those later.

On the Buttons Tab, the buttons use TransformVar's and Hooks to populate the buttons - These should already be set up correctly but if not, add in the TransformVar's here:

You can see the hooks on the Inventory Gameobject here:

In the References Tab, we will need to add some references here too, but again, these should already be set for you:

These TransformVar's have hooks which link up to each individual Gameobject in the world.

You must put the Inventory TransformVar's in order that they are displayed e.g. If you have 5 tabs left to right, and it go's: General, Weapons, Armour, Resouces, KeyItems - then you must register the inventories in that order for the tab switching to correctly work.

In order for buffs/debuffs to work correctly and effect all the unarmed damagers, you need to add the attack triggers into the List of Damager Components on the References Tab. This way, they have a reference to all the unarmed damagers when applying certain all damage buffs etc.

Inventories

Next, on the Inventories, on the tabs, you need to set up those references:

You don't need to set the Inventory Master as that is set at runtime automatically.

You need to give the Inventory a unique Inventory Name and set the Inventory Type to "Player". You can set a dropping offset as well if you wish but feel free to leave it to the default which drops it 2 units in front and above you. Inventory Slots you will not need to touch as this gets generated at runtime automatically.

Buttons

On the functional buttons e.g. Equip, Use etc. You need to set up references back to your Inventory master. This will allow a cyclic connection. You do this via setting the "Player" TransformVar as shown here:

Remove Event from PickUp/Drop Component (If needed)

If you are amending one of the Malbers demo scenes, you will need to remove the existing On Item Picked event for Holster_SetWeapon as shown in this screenshot. This is because setting the holsters will be handled directly via the Inventory and not directly when you pick up the item anymore.

Other Considerations

You may also want to consider the InventoryUI Gameobject and make sure all the references are set there as well. These should be set by default as they are all internal within the prefab itself, but if not, set them up as per screenshot.

Also consider the children of the HeaderButtons gameobject.

Each child corresponds to the image of the tab at the top of the inventory. Each one should have an Event Trigger component as a Pointer Down as per screenshot:

Again, this should be set by default in the prefab, but if not, then order your Tabs 1 to 5. E.g. General is the first tab, so it is Tab 1.

Opening/Closing the Inventory Screen

To open/close the inventory (or any screen in the Inventory Add-On), you will need the UIManager Prefab added into your scene from the InventorySystem -> Prefabs folder.

Then once you've done that, simply add a new input on your Malbers Input component of type "Down" e.g. Button press type, then add this:

The Event Listener for this exists on the UIManager Prefab and then it triggers the UIManager.SwitchUIState. This is called whenever a new screen is opened/closed.

Disabling/Re-enabling the Cursor

If you are setting up the inventory on the back of one of the Malbers AC demo scenes, there is a settings menu included that disables the cursor. Obviously you will need the cursor when using the inventory. Therefore, make sure you also do this when setting your input:

You can also consider things like disabling camera input/movement here as well, but I shall leave this up to the user to decide what is best for their game.

And that's it! That's the basic setup complete. Next step is to start creating your own items so you can collect them and use them - see the next page for more information!

For Registered Items, we will leave this blank for now as we will be creating our first item in this section:

Creating a new Item