Skip to content

Multiplayer inventory system for Unity using Netcode for Gameobjects

License

Notifications You must be signed in to change notification settings

NaolShow/Sacados

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sacados

Sacados

« The networked inventory system that you always needed »

GitHub license

GitHub issues GitHub pull requests GitHub last commit


🚀 Quick example

Here's a quick example on how to use Sacados. In this example we are creating an inventory with no GUI (most basic one)

using Mirror;
using Sacados.Core.Containers;
using Sacados.Core.Items;
using UnityEngine;

public class InventoryExample : MonoBehaviour {

    // Container assigned in the inspector
    public Container Container;

    private void Start() {

        // Initialize and register a test Item for both client and server
        Item.Register(new Item() {

            ID = "test_item",
            MaxStackSize = 64

        });

        // If it's the server
        if (NetworkServer.active) {

            // Initialize the container with 30 slots
            Container.Initialize(30);

            // Give 17 of our test item
            Container.Give(new ItemStack(Item.Get("test_item"), 17));

        }

    }

}

About

Multiplayer inventory system for Unity using Netcode for Gameobjects

Topics

Resources

License

Stars

Watchers

Forks

Languages