How to make a simple Shop in Unity

  Рет қаралды 59,918

Zyger

Zyger

3 жыл бұрын

Since a while back the download link broke as the file got accidentally deleted. This means there is no source code. apologies.
➤Patreon: / zyger
➤Discord: / discord
➤Instagram: / gabzxd
➤Twitch: / officialzyger
➤Twitter: / zygerdesigns
---------------------------------------------------------------------------------------------------------------------------
Ever wanted to make a simple shop system? yes! then this is the tutorial for you. Here I will show you how to make a shop system in unity under 15 minutes. Its completely customizable, editable and changeable. Its made using a 2d array to keep things efficient and optimised. This simple system will also allow you to add how ever many items you want without having to add more scripts. Basically if you follow this tutorial you will be able to add and change items whenever and however you want without having to write new scripts which is super easy. Also like if your having issues following the tutorial you can just directly download it and use it straight away!!!!!
---------------------------------------------------------------------------------------------------------------------------
Subscribe if you like Oreo ice-cream -------------------------------------------------------------------------------------------------------------------------
➤WISHLIST MY GAME: store.steampowered.com/app/16...
-------------------------------------------------------------------------------------------------------------------------

Пікірлер: 176
@paperkid6821
@paperkid6821 3 жыл бұрын
Finally now I can sell drugs and guns
@viliusraguotis1618
@viliusraguotis1618 3 жыл бұрын
😂
@jedidiaholadele2086
@jedidiaholadele2086 3 жыл бұрын
😂😂
@belkacemF
@belkacemF 3 жыл бұрын
lol
@ninjaser6449
@ninjaser6449 3 жыл бұрын
Yep
@landon5435
@landon5435 3 жыл бұрын
I'll take your entire stock
@williamsauer3546
@williamsauer3546 3 жыл бұрын
No one: Me in the description: Bippity Boppity your thing is now my property
@williamsauer3546
@williamsauer3546 3 жыл бұрын
@SwaneZ Ha yeah well I Bippity Boppityed his line now its my property
@randomcreative2023
@randomcreative2023 3 жыл бұрын
dani
@TheDarkSide11891
@TheDarkSide11891 3 жыл бұрын
Been looking for a tutorial like this for a while. Nice!
@gamedevgoose9887
@gamedevgoose9887 3 жыл бұрын
Finally a solution for my underground milk cartel. Very cool!
@gamedevgoose9887
@gamedevgoose9887 3 жыл бұрын
(And my coffee game of course. I’m def not running a coffee cartel as well 👀)
@thinkthatgabs2316
@thinkthatgabs2316 3 жыл бұрын
😂
@NasojGnehzStudioRetry
@NasojGnehzStudioRetry 5 ай бұрын
Thank you for making one of the only few unity shop video that is understandable.
@karam7399
@karam7399 3 жыл бұрын
never been this early in my life ,this says something
@bennettkrubakar4412
@bennettkrubakar4412 3 жыл бұрын
Had to wait a long time for ur new video.This tutorial was worth the wait. Gr8 job😉👍
@RedTopAnimation
@RedTopAnimation 3 ай бұрын
thank you woman from 3 years ago it really helped, the only working shop tutorial that i found
@scratchtutorials1068
@scratchtutorials1068 3 жыл бұрын
wow Zyger I am excited that you have started to make tutorials!
@aliciadiaz8020
@aliciadiaz8020 2 жыл бұрын
This saved me from despair XD Thank you very much, great job
@girofare
@girofare 3 жыл бұрын
Perfect. Thanks ! The Only one tuto of it I've found in youtube !
@Agent-zg5ec
@Agent-zg5ec 3 жыл бұрын
Thanks for tutorial. In time when I needed.
@voxelkooow
@voxelkooow 2 жыл бұрын
Great, thanks. Small suggestion: Use UI.Image component instead of SpriteRenderer (icons), because when scrolling the text disappears, but the sprites remain visible.
@ibpositive757
@ibpositive757 3 жыл бұрын
awesome tutorial! here's hoping for the save tutorial as well. Keep up the amazing work!
@charlesthedev
@charlesthedev 2 жыл бұрын
Fantastic tutorial, really great and even provided source code, 10/10 subbed
@Husmanmusic
@Husmanmusic 3 жыл бұрын
Amazing tutorial! Thank you
@reubenrk3406
@reubenrk3406 3 жыл бұрын
Yey. Finally, my shopping system works
@homeofgamesnews
@homeofgamesnews 3 жыл бұрын
Great job, you can make a class or struct that hold information for each button, that will help you to save buttons information later. The using of update function in each button is bad practice. instead of thet the using of the Interfaces of EventSystem such as IPointerDown or IPointerUp is good practice, and that will give you good performance 👍.
@begreen2809
@begreen2809 3 жыл бұрын
Thanks for this! Super helpful!
@carljohnson75
@carljohnson75 3 жыл бұрын
Yesssss!!! MAKE MORE TUTORIALS LIKE THIS :))))
@sylvsyntax
@sylvsyntax 3 жыл бұрын
I was going to write something about the bad practices but I saw you got a few of those. Its a good start however. Theres a lot to learn and for a lot of beginners, its a good starting point. When you go over the saving system, look into binary formatting with classes instead of player prefs
@luckyknot
@luckyknot 3 жыл бұрын
It's nice to have more experienced devs helping by giving hints like this, a pity you do not have any videos to check in your profile you could teach a whole deal i'm sure :P
@sylvsyntax
@sylvsyntax 3 жыл бұрын
@@luckyknot i have another account but Im also transitioning so Im avoiding my dead name a bit.
@luckyknot
@luckyknot 3 жыл бұрын
@@sylvsyntax i understand, i'm very interested in following you, add me somwhere! :P
@Deridealized
@Deridealized 4 ай бұрын
Binary formatting should never be used, it is insecure and not recommended by microsoft to be used.
@Husmanmusic
@Husmanmusic 3 жыл бұрын
I love this, just can't wrap my head around how to also sell items from my inventory and display my inventory in the shop UI. Any ideas?
@jehanzeb11
@jehanzeb11 3 жыл бұрын
Your visual studio font colour combination is sickkk . Is there anyway i could get the same settings? Amazing video btw
@ZygerGFX
@ZygerGFX 3 жыл бұрын
It's called one dark pro
@g5haco
@g5haco 3 жыл бұрын
No one: Zyger: PirceTxt
@user-xe1sh3dj5x
@user-xe1sh3dj5x Жыл бұрын
Hi. Thanks for your great tutorial. How can we save it? When I exit from my shop changes disappear.
@BORDEV
@BORDEV 3 жыл бұрын
Gotta get that tutorial bread
@devvydoesstuff
@devvydoesstuff 3 жыл бұрын
Finally I can sell the secret 100% white milk powder
@MokarromHossain
@MokarromHossain 3 жыл бұрын
Me when Zyger becomes serious : Wait a minute ? Who are you ?
@lucasjhonatan1342
@lucasjhonatan1342 Жыл бұрын
Awesome tutorial, I added the Event System library and the option GetComponent().currentSelectedGameObject doesn't appear as an option for me, I know this is a Unity bug, but it's driving me crazy, is there another way to do this without needing to use currentSelectedGameObject ?
@mihail2217
@mihail2217 Жыл бұрын
Very informative video keep it up , but i keep getting an " Object reference not set to an instance of an object" error do u maybe know why?
@ShiNyChiDoRi
@ShiNyChiDoRi Жыл бұрын
I did all the same but my numbers does not come only Price text and quantity text comes
@aj656666
@aj656666 3 жыл бұрын
That was a great explanation! Thank you! How can I save the number of coins that are left for other scenes? (As my item shop is having a different kind of items in different scenes)
@ZygerGFX
@ZygerGFX 3 жыл бұрын
User player prefs. you can save values and they get saved in between scenes and even after closing the application/game
@aj656666
@aj656666 3 жыл бұрын
@@ZygerGFX Thank you very much!
@calllus9397
@calllus9397 3 жыл бұрын
Also thanks I'm going to probs use this information
@viliusraguotis1618
@viliusraguotis1618 3 жыл бұрын
Very useful thanks
@StacyMcCabe
@StacyMcCabe 3 жыл бұрын
How to make shop Simple: Potion go burr Long: watch the video
@StacyMcCabe
@StacyMcCabe 3 жыл бұрын
@Mr Maniac you need to edit your comment. It doesn’t apply anymore
@ArribaElMole
@ArribaElMole 2 жыл бұрын
Thanks for helping me
@princeofpersia3254
@princeofpersia3254 Жыл бұрын
Why you put on 4:40 in arguments of the array two numbers 5 ? I would like to know purpose behind it, thanks in advance
@ZygerGFX
@ZygerGFX Жыл бұрын
Honestly not sure now looking back. It was unevessary and didn't change anything so I guess you can change the number to however many items you want.
@MusicFlowDaily
@MusicFlowDaily 2 жыл бұрын
*Hi, much luv for the tutorials! :)* How to make it possible to buy a doubling of life in the shop? let's say usually in the game there are 3 lives, I want to be able to buy 6 in the shop (for just one session of the game). I can't find any tutorials on that topic. :(
@StacyMcCabe
@StacyMcCabe 3 жыл бұрын
I use scratch lol. I need a pc and then I will start coding. Real codeing, not scratch coding (unity, python, etc.) I started coding at 11 and I am 12. I am excited for the future.
@gramoner7310
@gramoner7310 3 жыл бұрын
same here xD
@viliusraguotis1618
@viliusraguotis1618 3 жыл бұрын
I strongly recommend rnd as a 15 years old game developer firstly understand what is objective programing and learn python before you start c# trust me its really useful (btw i am a game dev for 4 years so i know my shit)
@StacyMcCabe
@StacyMcCabe 3 жыл бұрын
@@viliusraguotis1618 I have coded in html. I know python but I can’t code in python.
@StacyMcCabe
@StacyMcCabe 3 жыл бұрын
@@viliusraguotis1618 I am exited to see what awaits. If you have a game then I would be eager to play it.
@StacyMcCabe
@StacyMcCabe 3 жыл бұрын
@Mr Maniac just saying the younger you are the easier it is. Code now not later. I am 12 so I need to start
@Shrumpf
@Shrumpf 3 жыл бұрын
Thank you :)
@blacklight8932
@blacklight8932 3 жыл бұрын
Assets\ButtonInfo.cs(16,32): error CS0021: Cannot apply indexing with [] to an expression of type 'GameObject'
@enderzxmbieez2022
@enderzxmbieez2022 Жыл бұрын
gameObject*
@azaankaleem09
@azaankaleem09 3 жыл бұрын
Can u make so my coin system is the value of the coins?
@halukddddd
@halukddddd Жыл бұрын
thank you
@seb.5053
@seb.5053 2 жыл бұрын
Can you do a video about how to save data?
@bumba5727
@bumba5727 3 жыл бұрын
Great video
@ZygerGFX
@ZygerGFX 3 жыл бұрын
thank you !
@fikrimleweb6085
@fikrimleweb6085 3 жыл бұрын
Why do you use capital letters for variables? Is your choice? I'm asking because most of developer says you can use capital letters for methods.
@beanscompany6847
@beanscompany6847 Жыл бұрын
thank you so much
@resumosde5minutos694
@resumosde5minutos694 Жыл бұрын
amazing
@wanchester6626
@wanchester6626 2 жыл бұрын
can u make a video for the save system
@SonuKumar-js5wv
@SonuKumar-js5wv 2 жыл бұрын
how to save gameobject ?
@jaeik6343
@jaeik6343 2 жыл бұрын
Please tell me how to save it as playerprefs
@imanmanz
@imanmanz 2 жыл бұрын
I really need this too
@LearnWithArjun
@LearnWithArjun 2 жыл бұрын
it does not work how do u get ButtonInfo form event system if the script is not in the event system??
@LearnWithArjun
@LearnWithArjun 2 жыл бұрын
ok ya it works i was just did not tag the event system lol
@KhushalKhandelwal-ns4eu
@KhushalKhandelwal-ns4eu Жыл бұрын
i was unable to download file
@mnm__studios
@mnm__studios 2 жыл бұрын
Please make a saving the items purchased tutorial...
@FC12CGaming
@FC12CGaming 2 жыл бұрын
any way of implementing my custom score one for this code
@ZygerGFX
@ZygerGFX 2 жыл бұрын
What do you mean ? Can you explain ?
@rodrigobogado653
@rodrigobogado653 Жыл бұрын
very goooddddddddd
@HaramLord
@HaramLord 3 жыл бұрын
I think it would make sense to post the code to Github instead of making ppl download the code through google drive or something like that. It'll also help with keeping track of progress of the project!
@ZygerGFX
@ZygerGFX 3 жыл бұрын
That's very true thank you I'll try update is asap
@3dssolidsnake
@3dssolidsnake 3 жыл бұрын
save and load system plez?
@jawwaadjanjua2716
@jawwaadjanjua2716 3 жыл бұрын
Could you make a level select in unity tutorial plz????
@marvicbautista7080
@marvicbautista7080 3 жыл бұрын
Can you tell me how to fix, I cant add the buy funtion on the button.
@marvicbautista7080
@marvicbautista7080 3 жыл бұрын
any one plss
@caidenmacgregor3271
@caidenmacgregor3271 2 жыл бұрын
@@marvicbautista7080 Same. Did you ever figure it out? :P
@kushalbaid
@kushalbaid 3 жыл бұрын
Nice
@ZygerGFX
@ZygerGFX 3 жыл бұрын
Thank you
@Saladon89
@Saladon89 Жыл бұрын
Awesome vid, Wheres the saving tutorial 😂😂??
@ahmedmoubarik168
@ahmedmoubarik168 3 жыл бұрын
Please make the second part
@jaiminvashi4407
@jaiminvashi4407 3 жыл бұрын
I really want a tutorial series about multiplayer games in unity plssssss×♾ Since brackeys not making videos anymore i only trust you plsssssss×♾♾♾♾♾♾♾♾♾
@user-gj9vx3vr7e
@user-gj9vx3vr7e 3 жыл бұрын
Please can you make part 2
@69bruh
@69bruh 3 жыл бұрын
MORE TUTS
@meg1a498
@meg1a498 3 жыл бұрын
you should try to make Among Us in Core.if you like idea pls like so Zyger sees it.
@GreenTea-Pose
@GreenTea-Pose 3 жыл бұрын
gg
@gazzolapw
@gazzolapw Жыл бұрын
Download link is broken.
@user-ko3rb4sl4z
@user-ko3rb4sl4z 5 ай бұрын
Make a same video on "How to make a Buying item or land in idle game in unity 3d". for example game name: Outlets Rush
@belkacemF
@belkacemF 3 жыл бұрын
i was gonna say ma man..but i remember you are a girl soo....you are the best indie developer girl....actually you are the only one i know🤔..its weird there is no too much girl developer
@2bee103
@2bee103 3 жыл бұрын
dani is a girl also
@gramoner7310
@gramoner7310 3 жыл бұрын
For some reason it says that there are 4 comments when actually there are like 30 xD
@sylwestermoniuszko-szymans1488
@sylwestermoniuszko-szymans1488 2 жыл бұрын
Interesting channel. I am facing now need of Item shop in the game that my daughter is making (I am doing scripts and music), and found your channel like this. I think I will have a little bit different approach. Since I have already my inventory system, currency and save system I think I need to build it on top of what we already have. So I was thinking about making script ShoppingItem, and then this would have reference field for prefab GameObject, because I have all the info I need on a ScriptableObject attached to the prefab, so I could read it from there. Then my ShopManager would only hold the reference to an array of ShoppingItem items, and to my currency.
@isto_inc
@isto_inc 3 жыл бұрын
Same release day as amazon prime day. COINCIDENCE?!?
@magicpepe582
@magicpepe582 2 жыл бұрын
i though i am here to watch unity tutorial instead of learning rapping haha
@arabiannights7183
@arabiannights7183 2 жыл бұрын
nicely explained. but your script doesnt work. and why you zip your whole project.. you should have zipped only the script and check the script has no error before zipping
@FinalP0int
@FinalP0int 3 жыл бұрын
The ShopManager shouldn't have to care about the UI, the UI has to show the info provided by ShopManager. Check this video kzbin.info/www/bejne/rHXVind3gsmjq8U
@user-ij1rg8ki1c
@user-ij1rg8ki1c 10 ай бұрын
queria entender oque fala
@graystripewt279
@graystripewt279 3 жыл бұрын
not first
@user-kh2xr2nl5s
@user-kh2xr2nl5s 2 жыл бұрын
牛逼
@phuchaotran4880
@phuchaotran4880 Жыл бұрын
use [SerializeField] pls
@Detrax17172
@Detrax17172 3 жыл бұрын
5.
@pedro-ms6te
@pedro-ms6te 3 жыл бұрын
hey! can u see your email? i have an issue
@Corey_Snodgrass
@Corey_Snodgrass 11 ай бұрын
My man is talking with a speed of 1.25. drop it to .75 to equal it out lol.
@geekmashup6829
@geekmashup6829 3 жыл бұрын
hi
@MikeHasBeenCool
@MikeHasBeenCool 3 жыл бұрын
fem-dani
@desert5651
@desert5651 3 жыл бұрын
first
@ZygerGFX
@ZygerGFX 3 жыл бұрын
im first actually xD
@viliusraguotis1618
@viliusraguotis1618 3 жыл бұрын
Che che
@calllus9397
@calllus9397 3 жыл бұрын
Before you or it says that
@desert5651
@desert5651 3 жыл бұрын
Ez
@ultrahigh5961
@ultrahigh5961 Жыл бұрын
didn't work :/
@ZygerGFX
@ZygerGFX Жыл бұрын
what exactly didn't work ? are you getting errors or ? also did you debug your code to see whats not working ?
@ultrahigh5961
@ultrahigh5961 Жыл бұрын
@@ZygerGFX I got an Out-of-Bounds error on a line where coins get substracted ("coins -= ...").
@ZygerGFX
@ZygerGFX Жыл бұрын
@@ultrahigh5961 okay that means where you're removing coins for an index that doesn't exist. so like your length may be 3 and your trying to remove from array spot 3,4,5 6 ect one that's not in bounds. so just check the length of your array to double check, that its long enouogh and not under 0.
@walney2008
@walney2008 2 жыл бұрын
please speak shop equal cs, and by arms gamer
@AmilRaza-dl2zx
@AmilRaza-dl2zx 27 күн бұрын
.
@WolfsDenShop
@WolfsDenShop 2 ай бұрын
No Source. No Watch!
@MaskMajor
@MaskMajor 6 ай бұрын
your username sounds like a racial slur for aliens, great tutorial tho!
@MrTomateSalat
@MrTomateSalat 3 жыл бұрын
I don't want to sound mean - but there are a lot of things one shouldn't do. I can understand that you didn't choose scriptableobjects for items in order to keep the tutorial short - but a multidim-array with magic-numbers is really a no-go. At least having a proper struct and use that in a list/array would've improved the code a lot. If you want to store it in a compact way later on in playerprefs - ok. But you can have mappers to transform data. There is really no reason why one should go with such errorprone data-structure. Next problem is that you don't cache your objects. Why fetching the EventSystem every time? Why grabbing it in a such complicated way? "EventSystem.current" would replace GameObject.FindGameObjectWithTag("Event").GetComponent(). Also it doesn't need any tag (which is also errorprone). Then it isn't clear why you store a ref to the gameobject and not to ButtonInfo. But in overall ShopManager anyway shouldn't know about buttons. Just think of the Single-Responsibility-Principle. The ShopManager should decrease the coins and increase the amount. Thats it. And it could be easily achieved if Buy just takes the necessary parameters. Those could be provided by the ButtonInfo-class. I don't understand why you take the shopManager as GameObject and not as ShopManagerScript. The call to GetComponent is just a waste of resources. And this ButtonInfo could trigger the buy-Methode on the shopmanager. The values then also don't have to be updated on every frame. You could do that on Start/OnEnable and after each button click. Also I want to point out: this is meant as constructive feedback and I don't want to offend you with that.
@kaypathy
@kaypathy 3 жыл бұрын
U know your shit,nice I guess?
@mudokin
@mudokin 3 жыл бұрын
Came here to say this, when trying something out, this might be okay, but it shows bad practices over and over.
@kaypathy
@kaypathy 3 жыл бұрын
@@mudokin wudym?
@daddadia5015
@daddadia5015 3 жыл бұрын
Oh Jesus it’s the girl who can’t even make a game look better than the original
@thinkthatgabs2316
@thinkthatgabs2316 3 жыл бұрын
Honestly dude you so toxic. I see you commenting every few hours. Look shes clearly trying to have fun while making videos. Not everything you do is going to be perfect and be the best outcome. But its props to her that she gave it a go. And instead of commenting the same thing over and over again on a youtube channel go do something fun for yourself. Instead of making someone feel worse about themselves. 👍
8 DEVS Make a GAME without COMMUNICATING!
13:21
Blackthornprod
Рет қаралды 967 М.
Shop Tutorial Unity - [2021]
12:48
Flarvain
Рет қаралды 38 М.
WHY IS A CAR MORE EXPENSIVE THAN A GIRL?
00:37
Levsob
Рет қаралды 20 МЛН
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 16 МЛН
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 9 МЛН
UFC 302 : Махачев VS Порье
02:54
Setanta Sports UFC
Рет қаралды 1,4 МЛН
How I Became a Sea of Thieves Developer
8:05
Zyger
Рет қаралды 162 М.
How to Make A Simple Tooltip in Unity Tutorial
8:27
BMo
Рет қаралды 19 М.
Learning C# In A Week... Otherwise I Fail University
9:04
I Made a Graphics Engine (again)
8:27
Zyger
Рет қаралды 158 М.
How to make a HEALTH BAR in Unity!
21:06
Brackeys
Рет қаралды 1,1 МЛН
2 Python Developers VS $1000
15:04
PolyMars
Рет қаралды 1,7 МЛН
7 DEVS Make a GAME without COMMUNICATING!
17:18
Blackthornprod
Рет қаралды 647 М.
Unity Shopping System, Responsive UI (Part 1)
9:24
Hamza Herbou
Рет қаралды 59 М.
How much MONEY my Game made (and how much it cost!)
14:00
Code Monkey
Рет қаралды 156 М.
Shop Tutorial Unity #2 [2021] - Scriptable Objects
15:35
Flarvain
Рет қаралды 18 М.
Сумел остановить эскалатор🤯
0:40
WORLD TOP
Рет қаралды 3,1 МЛН
接下来就是路飞救两个小孩#海贼王  #路飞
0:39
路飞与唐舞桐
Рет қаралды 3,1 МЛН
9999 iq guy 😱 @fash
0:11
Tie
Рет қаралды 5 МЛН
Лучший лайфхак от Миракла 😄
0:31
Miracle
Рет қаралды 2,3 МЛН