{"id":13661926,"url":"https://github.com/KampinKarl1/Simple-Inventory","last_synced_at":"2025-04-25T06:30:52.158Z","repository":{"id":45727499,"uuid":"289546240","full_name":"KampinKarl1/Simple-Inventory","owner":"KampinKarl1","description":"Includes an Inventory, Pickups, Crafting, and Mining as well as a camera and unit controller, and an object spawner for creating environmental objects.","archived":false,"fork":false,"pushed_at":"2023-08-22T09:41:52.000Z","size":18483,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-10T17:45:20.994Z","etag":null,"topics":["crafting","inventory","mining","pickup","scriptableobjects","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KampinKarl1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-22T18:38:56.000Z","updated_at":"2024-04-10T07:22:59.000Z","dependencies_parsed_at":"2024-08-02T05:11:48.006Z","dependency_job_id":"47a2b9ff-7ef4-4e77-96d5-24c20b062515","html_url":"https://github.com/KampinKarl1/Simple-Inventory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KampinKarl1%2FSimple-Inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KampinKarl1%2FSimple-Inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KampinKarl1%2FSimple-Inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KampinKarl1%2FSimple-Inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KampinKarl1","download_url":"https://codeload.github.com/KampinKarl1/Simple-Inventory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250767013,"owners_count":21483906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crafting","inventory","mining","pickup","scriptableobjects","unity"],"created_at":"2024-08-02T05:01:44.516Z","updated_at":"2025-04-25T06:30:47.149Z","avatar_url":"https://github.com/KampinKarl1.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# Simple-Inventory (with simple Factorio-Like crafting and mining)\nCheck out the tutorials for this project here: https://www.youtube.com/playlist?list=PL8uuriBnyf5ngvXpWUo8h_Fw-vjhDQq3s\n\nUse this simple inventory, crafting, mining, and pickup system for prototyping your game.\n\n--Update (Feb 24, 2021)--\nAdded Item drops and fixed a huge import issue where Craftables pointed to null ingredients.\n\n----------Assets and Project Settings------------\n\nI mixed up the folders on this repo and folders that should be in Assets are spread out in this repository with Project Settings mixed\nin with everything else. My bad. \n\nPLEASE place the Project Settings folder (or at least the TagManager) in your Unity Project's Project Settings folder and everything\nelse in the Assets folder.\n\n-------------Items--------------\n\nItem and Craftable (inherits from item) cannot be attached to anything as they are ScriptableObjects.\n\nRight click in the project folder (in Unity Editor) to create new items and craftables (Create\u003eItem or Create\u003eCraftables\u003eNew Craftable). \n\nCraftables have an array of crafting ingredients that tells the CraftyCrafter what items are needed and how many of each item are needed to make said craftable - Currently only null check is when trying to GetIngredient and GetNumberNeeded.\n\n------------Pickups-------------\n\nPut the pickup script on a collidable object in your game that has a rigidbody on it. \n\nPlug the type of Item into the itemPickup field in the inspector. You also need to fill in the numberPickedUp field - There is no verification that there is at least one.\n\nThis uses OnCollisionEnter to check if the collision is from the Player (by tag) and gets the Inventory from that gameObject.\n\n------------Inventory------------\n\nPut the Inventory on your player. \n\nPlace the CrafyCrafter on your player and plug in the Inventory (via inspector).\n\n-UI-\n\nPlace the InventoryUI script on a gameobject containing your inventoryUI but not on the Inventory panel itself (or it will be DISABLED when set to inactive).\nSame with the Crafting UI (it's based on the same script as InventoryUI, so you have to plug in the same elements and treat it the same way [don't place it directly \non crafting UI panel]).\n\nPut the ItemSlotUI script on your ItemSlotUI prefab and make sure to setup the button and texts then plug it in to the CraftingUI and InventoryUI objects.\n\n---------------Mining--------------------\n\nPlace miner on your player or whatever units mine in your game \n\nMineable is the mine. It holds a finite amount of a resource/item. You could probably use ScriptableObjects for similar mine types (Tree holds TreeConfig with MaxResources, MiningTime, etc)\n\n-UI-\n\nCreate a gameobject on your screen overlay canvas with an image as a background for the fill bar, a child image to that set to fill type, and a resource image.\n\nYou'll need a WorldSpace Canvas with an Image to mark the current mine.\n\nEx. for inspecting a unit's mining progress.\n      \n      class Unit \n        void OnMouseDown()\n         UnitManager.InspectUnit (Unit u)  \n         \n      class MiningUI \n        InitializeUI\n            UnitManager.onInspectUnit += UpdateUI;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKampinKarl1%2FSimple-Inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKampinKarl1%2FSimple-Inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKampinKarl1%2FSimple-Inventory/lists"}