thanks bro! ive struggling with finding good tutorials on unity fundamentals (most just tell how to do one very specific thing and presume that everyone would do exactly that), but now it seems like i found my place :) sorry for the english, its a work in progress
@stacyardus38984 жыл бұрын
amazing place to help me start of with a simple yet reliable background, just gotta work out stacking objects now, thanks for the starting point :P
@Bronfit2379 Жыл бұрын
I click on the add object button. And the first slot remains white, all the following slots work fine. Please, help
@Steelersfan3556 жыл бұрын
great guide! are you planing on doing a tooltip tut as well?
@JB-iz8bi4 жыл бұрын
Sorry, but can you make a video on when you enter a GameObject's trigger, the AddItem function is performed and it adds an item to the inventory please? It is a really great tutorial, and thanks for making it.
@sherlyhudson21985 жыл бұрын
Can you please also implement save and load to the inventory? Its so confusing when it comes to saving an inventory unlike saving strings, ints, float etc. :s
@DapperDinoCodingTutorials5 жыл бұрын
Have a look at my video about saving game data with scriptable objects. It makes it very easy to save data on something like an inventory so long as the inventory is a scriptable object :)
@sherlyhudson21985 жыл бұрын
@@DapperDinoCodingTutorials I did check out your video but its a far more complex and advanced system compared to what I want, whereas I only want the inventory system that you can either use item or remove item. Also simply clicking a button should add a item to the inventory, thats all(with save + load system of course). Maybe your tutorial has the answer but because the scope is much bigger its hard to understand for example which scripts are useful for my situation.
@sherlyhudson21985 жыл бұрын
@@DapperDinoCodingTutorials Can you do a tutorial on it regarding scriptable inventory with save and load? lol my novice brain needs guidance.
@alicewithalex6 жыл бұрын
Cool)
@Redha-wv1fk3 жыл бұрын
Hi bro, can you help me make "save load" to this inventory, i tried many times but without success, i hope you could do it This is the inventory script using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class Slot : MonoBehaviour, IPointerClickHandler { private GameObject inventory; public enum property { usable, displayable, empty}; public property ItemProperty { get; set; } private string displayImage; public string combinationItem { get; private set; } void Start() { inventory = GameObject.Find("Inventory"); } public void OnPointerClick(PointerEventData eventData) { inventory.GetComponent().previousSelectedSlot = inventory.GetComponent ().currentSelectedSlot; inventory.GetComponent().currentSelectedSlot = this.gameObject; Combine(); if (ItemProperty == Slot.property.displayable) DisplayItem(); } public void AssignProperty(int orderNumber, string displayImage, string combinationItem) { ItemProperty = (property)orderNumber; this.displayImage = displayImage; this.combinationItem = combinationItem; } public void DisplayItem() { inventory.GetComponent().itemDisplayer.SetActive(true); inventory.GetComponent().itemDisplayer.GetComponent().sprite = Resources.Load("Inventory Items/" + displayImage); } void Combine() { if(inventory.GetComponent().previousSelectedSlot.GetComponent ().combinationItem == this.gameObject.GetComponent().combinationItem && this.gameObject.GetComponent ().combinationItem!= "") { Debug.Log("combine"); GameObject combinedItem = Instantiate(Resources.Load ("Combined Items/" + combinationItem)); combinedItem.GetComponent().ItemPickUp(); inventory.GetComponent().previousSelectedSlot.GetComponent().ClearSlot(); ClearSlot(); } } public void ClearSlot() { ItemProperty = Slot.property.empty; displayImage = ""; combinationItem = ""; transform.GetChild(0).GetComponent().sprite = Resources.Load("Inventory Items/empty_item"); } } AND THIS IS THE SLOTS SCRIPT using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class Slot : MonoBehaviour, IPointerClickHandler { private GameObject inventory; public enum property { usable, displayable, empty}; public property ItemProperty { get; set; } private string displayImage; public string combinationItem { get; private set; } void Start() { inventory = GameObject.Find("Inventory"); } public void OnPointerClick(PointerEventData eventData) { inventory.GetComponent ().previousSelectedSlot =inventory.GetComponent ().currentSelectedSlot; inventory.GetComponent().currentSelectedSlot = this.gameObject; Combine(); if (ItemProperty == Slot.property.displayable) DisplayItem(); } public void AssignProperty(int orderNumber, string displayImage, string combinationItem) { ItemProperty = (property)orderNumber; this.displayImage = displayImage; this.combinationItem = combinationItem; } public void DisplayItem() { inventory.GetComponent().itemDisplayer.SetActive(true); inventory.GetComponent().itemDisplayer.GetComponent().sprite = Resources.Load("Inventory Items/" + displayImage); } void Combine() { if(inventory.GetComponent().previousSelectedSlot.GetComponent ().combinationItem == this.gameObject.GetComponent().combinationItem && this.gameObject.GetComponent ().combinationItem!= "") { Debug.Log("combine"); GameObject combinedItem = Instantiate(Resources.Load ("Combined Items/" + combinationItem)); combinedItem.GetComponent().ItemPickUp(); inventory.GetComponent().previousSelectedSlot.GetComponent().ClearSlot(); ClearSlot(); } } public void ClearSlot() { ItemProperty = Slot.property.empty; displayImage = ""; combinationItem = "";`enter code here` transform.GetChild(0).GetComponent().sprite = Resources.Load("Inventory Items/empty_item"); } }