Тёмный

How to make a simple Shop in Unity 

Zyger
Подписаться 81 тыс.
Просмотров 62 тыс.
50% 1

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.steampow....
-------------------------------------------------------------------------------------------------------------------------

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 176   
@paperkid6821
@paperkid6821 4 года назад
Finally now I can sell drugs and guns
@viliusraguotis1618
@viliusraguotis1618 4 года назад
😂
@jedidiaholadele2086
@jedidiaholadele2086 4 года назад
😂😂
@belkacemF
@belkacemF 4 года назад
lol
@ninjaser6449
@ninjaser6449 4 года назад
Yep
@landon5435
@landon5435 4 года назад
I'll take your entire stock
@williamsauer3546
@williamsauer3546 4 года назад
No one: Me in the description: Bippity Boppity your thing is now my property
@williamsauer3546
@williamsauer3546 4 года назад
@SwaneZ Ha yeah well I Bippity Boppityed his line now its my property
@randomcreative2023
@randomcreative2023 3 года назад
dani
@gamedevgoose9887
@gamedevgoose9887 4 года назад
Finally a solution for my underground milk cartel. Very cool!
@gamedevgoose9887
@gamedevgoose9887 4 года назад
(And my coffee game of course. I’m def not running a coffee cartel as well 👀)
@thinkthatgabs2316
@thinkthatgabs2316 4 года назад
😂
@karam7399
@karam7399 4 года назад
never been this early in my life ,this says something
@StacyMcCabe
@StacyMcCabe 4 года назад
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 4 года назад
same here xD
@viliusraguotis1618
@viliusraguotis1618 4 года назад
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 4 года назад
@@viliusraguotis1618 I have coded in html. I know python but I can’t code in python.
@StacyMcCabe
@StacyMcCabe 4 года назад
@@viliusraguotis1618 I am exited to see what awaits. If you have a game then I would be eager to play it.
@StacyMcCabe
@StacyMcCabe 4 года назад
@Mr Maniac just saying the younger you are the easier it is. Code now not later. I am 12 so I need to start
@emad-dev
@emad-dev 4 года назад
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 👍.
@Blinkers2007GameDev
@Blinkers2007GameDev 22 дня назад
This stuff is GENIUS! Thank you for this tutorial! this is exactly what I needed and I learned alot from your video
@belkacemF
@belkacemF 4 года назад
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 4 года назад
dani is a girl also
@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.
@graystripewt279
@graystripewt279 4 года назад
not first
@StacyMcCabe
@StacyMcCabe 4 года назад
How to make shop Simple: Potion go burr Long: watch the video
@StacyMcCabe
@StacyMcCabe 4 года назад
@Mr Maniac you need to edit your comment. It doesn’t apply anymore
@jaiminvashi4407
@jaiminvashi4407 4 года назад
I really want a tutorial series about multiplayer games in unity plssssss×♾ Since brackeys not making videos anymore i only trust you plsssssss×♾♾♾♾♾♾♾♾♾
@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 ?
@KhushalKhandelwal-ns4eu
@KhushalKhandelwal-ns4eu Год назад
i was unable to download file
@seb.5053
@seb.5053 3 года назад
Can you do a video about how to save data?
@devvydoesstuff
@devvydoesstuff 4 года назад
Finally I can sell the secret 100% white milk powder
@g5haco
@g5haco 4 года назад
No one: Zyger: PirceTxt
@jaeik6343
@jaeik6343 3 года назад
Please tell me how to save it as playerprefs
@imanmanz
@imanmanz 3 года назад
I really need this too
@carljohnson75
@carljohnson75 4 года назад
Yesssss!!! MAKE MORE TUTORIALS LIKE THIS :))))
@itsthemeg
@itsthemeg 3 года назад
Please make a saving the items purchased tutorial...
@MeetSondagar-p7g
@MeetSondagar-p7g 8 месяцев назад
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
@MaskMajor
@MaskMajor 10 месяцев назад
your username sounds like a racial slur for aliens, great tutorial tho!
@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?
@DarkPlaysThings
@DarkPlaysThings 4 года назад
Been looking for a tutorial like this for a while. Nice!
@NasojGnehzStudioRetry
@NasojGnehzStudioRetry 8 месяцев назад
Thank you for making one of the only few unity shop video that is understandable.
@meg1a445
@meg1a445 3 года назад
you should try to make Among Us in Core.if you like idea pls like so Zyger sees it.
@sylvsyntax
@sylvsyntax 4 года назад
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 4 года назад
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 4 года назад
@@luckyknot i have another account but Im also transitioning so Im avoiding my dead name a bit.
@luckyknot
@luckyknot 4 года назад
@@sylvsyntax i understand, i'm very interested in following you, add me somwhere! :P
@Deridealized
@Deridealized 7 месяцев назад
Binary formatting should never be used, it is insecure and not recommended by microsoft to be used.
@Saladon89
@Saladon89 Год назад
Awesome vid, Wheres the saving tutorial 😂😂??
@Corey_Snodgrass
@Corey_Snodgrass Год назад
My man is talking with a speed of 1.25. drop it to .75 to equal it out lol.
@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
@blacklight8932
@blacklight8932 3 года назад
Assets\ButtonInfo.cs(16,32): error CS0021: Cannot apply indexing with [] to an expression of type 'GameObject'
@enderzxmbieez2022
@enderzxmbieez2022 2 года назад
gameObject*
@gazzolapw
@gazzolapw Год назад
Download link is broken.
@jehanzeb11
@jehanzeb11 4 года назад
Your visual studio font colour combination is sickkk . Is there anyway i could get the same settings? Amazing video btw
@ZygerGFX
@ZygerGFX 4 года назад
It's called one dark pro
@isto_inc
@isto_inc 4 года назад
Same release day as amazon prime day. COINCIDENCE?!?
@walney2008
@walney2008 3 года назад
please speak shop equal cs, and by arms gamer
@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
@SonuKumar-js5wv
@SonuKumar-js5wv 2 года назад
how to save gameobject ?
@WolfsDenShop
@WolfsDenShop 5 месяцев назад
No Source. No Watch!
@reubenrk3406
@reubenrk3406 4 года назад
Yey. Finally, my shopping system works
@phuchaotran4880
@phuchaotran4880 Год назад
use [SerializeField] pls
@BORDEV
@BORDEV 4 года назад
Gotta get that tutorial bread
@Shrumpf
@Shrumpf 4 года назад
Thank you :)
@FinalP0int
@FinalP0int 4 года назад
The ShopManager shouldn't have to care about the UI, the UI has to show the info provided by ShopManager. Check this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-vDrYDAMdpuc.html
@MusicFlowDaily
@MusicFlowDaily 3 года назад
*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. :(
@rodrigobogado653
@rodrigobogado653 Год назад
very goooddddddddd
@Agent-zg5ec
@Agent-zg5ec 4 года назад
Thanks for tutorial. In time when I needed.
@jubileu-m8d
@jubileu-m8d Год назад
queria entender oque fala
@محمد-ن2ج2ج
@محمد-ن2ج2ج Год назад
Hi. Thanks for your great tutorial. How can we save it? When I exit from my shop changes disappear.
@resumosde5minutos694
@resumosde5minutos694 Год назад
amazing
@dfgesfg
@dfgesfg 4 года назад
5.
@疯狂家居
@疯狂家居 2 года назад
牛逼
@AmilRaza-dl2zx
@AmilRaza-dl2zx 4 месяца назад
.
@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.
@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?
@viliusraguotis1618
@viliusraguotis1618 4 года назад
Very useful thanks
@charlesthedev
@charlesthedev 3 года назад
Fantastic tutorial, really great and even provided source code, 10/10 subbed
@magicpepe582
@magicpepe582 2 года назад
i though i am here to watch unity tutorial instead of learning rapping haha
@ShiNyChiDoRi
@ShiNyChiDoRi Год назад
I did all the same but my numbers does not come only Price text and quantity text comes
@RedTopAnimation
@RedTopAnimation 7 месяцев назад
thank you woman from 3 years ago it really helped, the only working shop tutorial that i found
@wanchester6626
@wanchester6626 3 года назад
can u make a video for the save system
@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.
@gramoner7310
@gramoner7310 4 года назад
For some reason it says that there are 4 comments when actually there are like 30 xD
@FC12CGaming
@FC12CGaming 2 года назад
any way of implementing my custom score one for this code
@ZygerGFX
@ZygerGFX 2 года назад
What do you mean ? Can you explain ?
@bumba5727
@bumba5727 4 года назад
Great video
@ZygerGFX
@ZygerGFX 4 года назад
thank you !
@aliciadiaz8020
@aliciadiaz8020 2 года назад
This saved me from despair XD Thank you very much, great job
@MokarromHossain
@MokarromHossain 4 года назад
Me when Zyger becomes serious : Wait a minute ? Who are you ?
@pedro-ms6te
@pedro-ms6te 3 года назад
hey! can u see your email? i have an issue
@calllus9397
@calllus9397 4 года назад
Also thanks I'm going to probs use this information
@jawwaadjanjua2716
@jawwaadjanjua2716 3 года назад
Could you make a level select in unity tutorial plz????
@ArribaElMole
@ArribaElMole 2 года назад
Thanks for helping me
@desert5651
@desert5651 4 года назад
first
@ZygerGFX
@ZygerGFX 4 года назад
im first actually xD
@viliusraguotis1618
@viliusraguotis1618 4 года назад
Che che
@calllus9397
@calllus9397 4 года назад
Before you or it says that
@desert5651
@desert5651 3 года назад
Ez
@ahmedmoubarik168
@ahmedmoubarik168 3 года назад
Please make the second part
@3dssolidsnake
@3dssolidsnake 3 года назад
save and load system plez?
@beanscompany6847
@beanscompany6847 2 года назад
thank you so much
@aw1lt
@aw1lt 4 года назад
MORE TUTS
@halukddddd
@halukddddd 2 года назад
thank you
@الشيخياسينالعمريالقناةالرسمية
Please can you make part 2
@HaramLord
@HaramLord 4 года назад
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 4 года назад
That's very true thank you I'll try update is asap
@girofare
@girofare 3 года назад
Perfect. Thanks ! The Only one tuto of it I've found in youtube !
@bennettkrubakar4412
@bennettkrubakar4412 4 года назад
Had to wait a long time for ur new video.This tutorial was worth the wait. Gr8 job😉👍
@Husmanmusic
@Husmanmusic 3 года назад
Amazing tutorial! Thank you
@geekmashup6829
@geekmashup6829 4 года назад
hi
@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.
@scratchtutorials1068
@scratchtutorials1068 4 года назад
wow Zyger I am excited that you have started to make tutorials!
@ibpositive757
@ibpositive757 3 года назад
awesome tutorial! here's hoping for the save tutorial as well. Keep up the amazing work!
@begreen2809
@begreen2809 3 года назад
Thanks for this! Super helpful!
@GreenTea-Pose
@GreenTea-Pose 4 года назад
gg
@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 4 года назад
Nice
@ZygerGFX
@ZygerGFX 4 года назад
Thank you
@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!
@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.
@MikeHasBeenCool
@MikeHasBeenCool 4 года назад
fem-dani
@MrTomateSalat
@MrTomateSalat 4 года назад
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 4 года назад
U know your shit,nice I guess?
@mudokin
@mudokin 4 года назад
Came here to say this, when trying something out, this might be okay, but it shows bad practices over and over.
@kaypathy
@kaypathy 4 года назад
@@mudokin wudym?
@daddadia5015
@daddadia5015 4 года назад
Oh Jesus it’s the girl who can’t even make a game look better than the original
@thinkthatgabs2316
@thinkthatgabs2316 4 года назад
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. 👍
Далее
Shop Tutorial Unity - [2021]
12:48
Просмотров 40 тыс.
How to make a HEALTH BAR in Unity!
21:06
Просмотров 1,1 млн
МАЛОЙ ГАИШНИК
00:35
Просмотров 225 тыс.
I Paid Fiverr Game Developers to Make the Same Game
10:25
How I Became a Sea of Thieves Developer
8:05
Просмотров 246 тыс.
I Made a Graphics Engine in Scratch
8:27
Просмотров 146 тыс.
Learning C# In A Week... Otherwise I Fail University
9:04
Making a Fake Multiplayer .io Game
11:03
Просмотров 148 тыс.
I Made a Graphics Engine (again)
8:27
Просмотров 172 тыс.
I Made a Graphics Engine
6:42
Просмотров 254 тыс.
МАЛОЙ ГАИШНИК
00:35
Просмотров 225 тыс.