Тёмный

Unity Tutorial - Simple Character Selection System 

RumpledCode
Подписаться 1,4 тыс.
Просмотров 86 тыс.
50% 1

Download link:
drive.google.c...
All feedback is welcome!
My website: rumpledcode.com
Company website: double-lens.com
Music:
Prod. Riddiman x oldboyy - Radio

Наука

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

 

17 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 148   
@aleef1735
@aleef1735 Год назад
For everyone who had a problem with the character not changing on the screen but changing in the code make sure you populate the Characters array with the prefabs already in the hierarchy and not with the prefabs from your assets. Look at 0:50. When you click on the array elements it should highlight the prefabs in the hierarchy.
@tejas793
@tejas793 Месяц назад
Thanks
@dominiquedossantos6684
@dominiquedossantos6684 2 года назад
I've been having a hard time figuring out how I would implement my character selection. I have more specific needs like being able to unlock characters and select a character from the list of unlocked characters. Most videos were fairly long and went into too much detail for me to follow. This was the shortest video, and honestly, I was sceptical at first, but your video was insightful and easy to follow and understand. Great work :)
@safidjef4005
@safidjef4005 Год назад
A little optimization in PreviousCharacter() function : you don't have to use an if statement public void PreviousCharacter() { characters[selectedCharacter].SetActive(false); selectedCharacter = (selectedCharacter - 1 + characters.Length) % characters.Length; characters[selectedCharacter].SetActive(true); } you can also store characters.Length value in a variable so it's not calculated each time
@RumpledCode
@RumpledCode 3 года назад
1:43 - Code
@isaachayward8760
@isaachayward8760 3 года назад
Thanks man helped a lot !
@gamecreatorc
@gamecreatorc 3 года назад
I like the pacing and clarity of your video. Coincidentally, I'm learning Unity right now so this taught me a few things. Thanks for sharing.
@RumpledCode
@RumpledCode 3 года назад
Thank you for the feedback :) I'm glad I could help!
@maliktot7182
@maliktot7182 5 месяцев назад
I might be too late, but i wanted to ask how you would spawn the player rotated -90 degrees on the Y axis. Great tutorial btw, perfect explanation, no useless talking, you kept it short and clear, thanks.
@bengreat6889
@bengreat6889 3 года назад
I really love this, so short and precise. Keep up the good work. Why not expand on it by adding a lock and unlock feature to it. Other than that 👍🏽👍🏽👍🏽
@georgemarkus8608
@georgemarkus8608 3 года назад
I know Im asking the wrong place but does anyone know a trick to get back into an instagram account? I somehow forgot the account password. I would love any assistance you can offer me.
@georgemarkus8608
@georgemarkus8608 3 года назад
@Jude Jad thanks for your reply. I found the site thru google and Im waiting for the hacking stuff now. Looks like it's gonna take quite some time so I will get back to you later with my results.
@georgemarkus8608
@georgemarkus8608 3 года назад
@Jude Jad It worked and I now got access to my account again. I'm so happy! Thank you so much you saved my account !
@judejad9782
@judejad9782 3 года назад
@George Markus no problem =)
@pigpeppa5308
@pigpeppa5308 9 месяцев назад
​@@georgemarkus8608 Yeah this really is a wrong and weird place
@atthiyya
@atthiyya 2 года назад
The next and previous button doesn't work for me, i was make sure again and again but it's still not working, can someone help me? but thanks for the video sir ^^
@_SF_Media
@_SF_Media 3 года назад
A suggestion : Perhaps make this and a few other videos in a series showing how to create a more complex Start Menu. Really hard to find quality videos on this topic.
@bruhmoment-it9jn
@bruhmoment-it9jn 3 года назад
in my opinion and experience start menus are like the easiest thing to make, you just have to have a basic understanding oh how it works and then you can make one yourself
@_SF_Media
@_SF_Media 3 года назад
@@bruhmoment-it9jn It's not necessarily the UI that I'm having trouble with as much as ting it all together with code. I only have basic knowledge of C# but I can design assets for a UI all day long. I'm sure there are plenty of others that would say the same, hence the suggestion.
@bowl1858
@bowl1858 2 года назад
Watch brackeys's video about menus
@_SF_Media
@_SF_Media 2 года назад
@@bowl1858 Did that, and he does a good job of partial menus, but none of his stuff is complete, and none very detailed. Thanks for the suggestion.
@losamigos512
@losamigos512 3 года назад
Doesnt work. All Capsuls are on the scene. Its broken script. its not selected on the scene, but it selected prefabs in project)
@sophiehealey4783
@sophiehealey4783 3 года назад
when you place them in the scene don't forget to uncheck the visibility mark on the objects that aren't supposed to be visible yet. Then when you start playing the game/ scene it should work
@lucaverschure2489
@lucaverschure2489 2 года назад
@@sophiehealey4783 still does not work for me
@sibertroner
@sibertroner 3 года назад
This is great, a question how can I do so that when I start in the selection menu it loads me with the last selected object
@naythun8432
@naythun8432 3 года назад
Thanks so much! this was super fast and easy. One question: Once the character is loaded in the playable scene, how do you reference the selected character (e.g. to respawn them)?
@ECSOrder66
@ECSOrder66 2 года назад
Hi. I use the public void StartGame() as a function for a respawn button, works great!
@neilgabrielcarino100
@neilgabrielcarino100 Год назад
The selected character is not spawning in the game scene.
@Semmetje11lolly
@Semmetje11lolly 3 года назад
Thank you very much! This is exactly what I needed, something simple that works!
@demonplayer2372
@demonplayer2372 Год назад
i did same and my character doesnt spawn in game
@henishmandhania4281
@henishmandhania4281 3 года назад
Hi awesome tutorial. I have one problem i can get the character to come to the other scene however as its a clone object my camera stops following the cloned player. Do you know how i get can it to follow a clone player?
@rudain4064
@rudain4064 3 года назад
Same problem bro
@treeeza7601
@treeeza7601 3 года назад
same here
@henishmandhania4281
@henishmandhania4281 3 года назад
@@rudain4064 hey bro in a different tutorial 3D Skin Shop for beginners part 1 by youtuber rickeydev he answered my question. I used that and it worked in my project so maybe give that a go if it works for you!!
@rudain4064
@rudain4064 3 года назад
@@henishmandhania4281 thanks buddy
@mogstatroy2602
@mogstatroy2602 2 года назад
Hello Thanks for the video I felt it was particularly good having watched and followed along with a few other "Character Selection" tutorials. The others were pretty good but seemed over complicated in comparison to yours. Keep up the good work RumpleCode, RU-vid is a harsh and unforgiving environment but if you stick to providing the best for your audience they will help you survive.
@christopherdoiron4294
@christopherdoiron4294 3 года назад
how can we have character data from a scriptable object show, like character stats? So choosing would be based on more than the sprite.
@bruce5236
@bruce5236 Год назад
I am getting index out of range error, I check the script for 3 hours and I don't know what is going wrong, help me :(
@weebaki2994
@weebaki2994 3 года назад
Thanks for the video nice job...But i have some problems Whenever i select the character i start with my previous character.I try to disable the previous character,but as a result nothing happen.In the hierarcy show that the selected character have spawn but it doesn't displayed in my game.What should I do?
@funnycarshorts1659
@funnycarshorts1659 2 года назад
after using this my camera script is not working
@ayberktunca4874
@ayberktunca4874 3 года назад
I implemented the code to my game but when I got in the game scene my camera did not follow the character . Can you help a bit I am absolute beginner and I don't know how to change this :(. ( I thought, like my camera,text and kinda stuff has a refference in my player so , when I use prefab I couldn't use them in the scene because of the prefab) Thanks for the video again btw !!
@paradox4913
@paradox4913 3 года назад
If I remember correctly, you should be able to just set the camera as a child of the player character and it should follow the character at all times after that. Please, someone correct me if I'm wrong.
@ECSOrder66
@ECSOrder66 2 года назад
@@paradox4913 Nah, you good. I was just about to comment that.
@kamman8884
@kamman8884 Год назад
You have to make a tag and aplly it to both players and make a camera folloe an object with that tag
@michaelblosenhauer9887
@michaelblosenhauer9887 Год назад
Hello world, awesome tutorial. I implemented it in my project last night. I knew I was gonna have a problem with my camera movement controller once I switched my player objects to prefabs. I tried using the spawn character script to also set the target for my camera script but failed pretty miserably at that. So, looking for suggestiins on how to get a camera to follow the instantiated prefab. Thanks to anyone that can help.
@WhileAwayGame
@WhileAwayGame 2 года назад
Great and simple tutorial!!!! Really helpful as a beginner!
@itsnikko685
@itsnikko685 3 года назад
is there any way you can make this work like Overwatch style select screen?
@AGTAtharv
@AGTAtharv 11 месяцев назад
heyy i tried using the keys but it didnt work ...i checked the "on click and function "nothing was selected in functions what to do ? it doesnt show me the option to select "CharacterSelection.Next" and previous ....please help
@ashland6562
@ashland6562 Год назад
When I try to import the script into the button component, the only options are No Function and Monoscript which has string name. What should I do
@nickblaster6184
@nickblaster6184 2 года назад
im your 1000th subsriber
@mehmedakifay4005
@mehmedakifay4005 3 года назад
If I had money, I would like to buy you a cup of coffee. For now, I am only able to say "Thank you"
@danharris8872
@danharris8872 2 дня назад
Thanks so much for this information
@dkordy
@dkordy 2 года назад
Fantastic, if only you had explained how the camera can follow that chosen character !? I have to dig through you tube now to find it! but thanks anyway, I like the simplicity of this tutorial but incomplete for my needs ... Isn't it logical that the camera will follow the player? how would I direct that camera now to follow the chosen player!?
@lawrence_g3
@lawrence_g3 Год назад
Did you find a solution?
@cool_gamertag4488
@cool_gamertag4488 2 года назад
You made this extremely simple for me thank you
@Steve-gi2yj
@Steve-gi2yj 3 года назад
what game object did you use to show the character on the screen? can you give a little more detail or even step by step?
@raef404
@raef404 9 месяцев назад
This works realy well!! I'm working a point shop where you get total score at the end and with that currency you can unlock new ones. I already have like item name price and bool if bought but not sure where to go now. Any documentation direction would be nice 👍 I added private void awake() In the character selection c# It has foreach methode to loop at the moment. My mind just took too much in one go Edit: oh this was 3y old vid, my bad
@Diertstarr
@Diertstarr 2 года назад
How are you not getting an error for "The name 'selectedCharacter' does not exist in the current context" !?
@user-ss9du8ft9z
@user-ss9du8ft9z 3 года назад
Hello. I have two cameras. Camera "Games" and "Preview" How to save PlayerPrefs.GetInt correctly when I go to the "Game", it is saved, then I go back to the Preview, it is deleted, then I go back to the "Game", and it saves another PlayerPrefs.GetInt Tried many methods, something doesn't work
@ByteSizeLyt
@ByteSizeLyt Год назад
If we wanted this multiplayer, is there any way to make it so that only certain people can use certain characters
@fluffystuff
@fluffystuff 9 месяцев назад
Thanks man I was really struggling to do this on my car game. I added different cars to the game. By the way I added the unlock system myself 🗿
@pawelishes1026
@pawelishes1026 2 года назад
You described everything so well!!!
@elicarloz9057
@elicarloz9057 2 года назад
Would this work for a 4 player game, where the the four players will be selecting their character at the same time?
@HingalshDealer
@HingalshDealer 3 года назад
Why not "selctedCharacter + 1" instead of "(selctedCharacter + 1) % characters.Length" in the NextCharacter Funtion?
@HingalshDealer
@HingalshDealer 3 года назад
I understand it now. It is so because it should not be added infinitely, but starts again at 0
@HingalshDealer
@HingalshDealer 3 года назад
very simple code👍
@fffideo
@fffideo 3 года назад
Thank you very much friend, this helped me so much for my project
@RumpledCode
@RumpledCode 3 года назад
Happy to help!
@Madarauchiha-jn3cb
@Madarauchiha-jn3cb 9 месяцев назад
Yo quiero cambiar de skin Al mirar un objeto Por ejemplo Soy un balón y miro una maceta Entonces al presionar un botón Me convierto en la maceta
@kamleshk267
@kamleshk267 3 года назад
I have a model and it's already working in the game. I don't have the menu to switch between the models, how can I do that?
@RumpledCode
@RumpledCode 3 года назад
I'm not quite sure what you're asking. Are you trying to recreate the menu from the video and having trouble?
@kamleshk267
@kamleshk267 3 года назад
@@RumpledCode I wanna create a menu to select a character and play the game ahead. I have made the game but I want something in the beginning which allows user to select a character.
@danielyyi
@danielyyi 3 года назад
Kamlesh K like Overwatch or Valorant right? I want to do the same. Pretty sure instead of using the arrow keys u just have like character buttons
@kamleshk267
@kamleshk267 3 года назад
@@danielyyiit was an assets "incevtor" I deleted all the assets, models etc except the character and third person camera, now I want to add multiplayer features to it. Like if someone open the game remotely we all can see each other in game in realtime.
@danielyyi
@danielyyi 3 года назад
Kamlesh K multiplayer is hard, j look up a tutorial
@bujinkanatori
@bujinkanatori 3 года назад
Natural born teacher
@simonvutov7575
@simonvutov7575 3 года назад
THANK YOU SO MUCH, its exactly what i needed
@imheretosleep
@imheretosleep 2 года назад
Guys can I apply this concept using a scriptable object? I wanted to create a 2D game in which the player can freely choose what kind of weapon to use...
@sunilshetty5510
@sunilshetty5510 3 года назад
How to show the name of selected character in the character selection scene not in the the actual game scene?? HELP!!!!
@StroberriBS
@StroberriBS 3 года назад
Does anyone know how to load the character you selected when you go back to the main menu? TIA
@moingnester6973
@moingnester6973 3 года назад
Its working but the only problem is that The name 'Player' does not exist in the current context
@indiandev1588
@indiandev1588 2 года назад
and sir u have any Idea of It main menu choose car not showing in level unity sir pls reply
@indiandev1588
@indiandev1588 2 года назад
sir pls reply
@SweetHoneycode
@SweetHoneycode 3 года назад
Wouldn't instantiate from the array be a better approach rather than child game objects?
@muhammadshahab3889
@muhammadshahab3889 3 года назад
Can you make tutorial to explain to change player with other player during game play, for example, we are playing with car A and we collected something in game play and our car A change into Car B
@that1lilguy
@that1lilguy 2 года назад
i dont undestand, the script is for the game manager right?
@nicolasportu
@nicolasportu 2 года назад
Cristal clear! :)
@bigfetcatsshow8693
@bigfetcatsshow8693 Год назад
Cool BUT I want so the player LATER on can unlock the other ones
@sharodtenkaichiz8581
@sharodtenkaichiz8581 Год назад
Where can we download the script
@docchowda7087
@docchowda7087 2 года назад
thanks, but one thing. i can pick a player, but when I get into the game it goes back to the defualt (red), what do I do
@tejas793
@tejas793 Месяц назад
getting the same issue. trying to figure it out.
@ruisu2105
@ruisu2105 3 года назад
how do I make a camera to follow the clone?
@jonas999lljw
@jonas999lljw Год назад
did u find a solution?
@sivareno
@sivareno 3 года назад
How to spawn new character to the last character's position?
@sync3471
@sync3471 2 года назад
Choose your character! Your options are bean, bean, bean, and bean!
@toptrending602
@toptrending602 3 года назад
How you make dark background in this scene ?
@bujinkanatori
@bujinkanatori 3 года назад
How to activate those next nad previous functions, Gees! You didnt link them to any game object!
@raisapernu7170
@raisapernu7170 3 года назад
So I created an empty gameobject called 'GameManager' and inside it another empty called "Spawner". I see that my chosen character spawns there. So I assume this "GameManager" is "Player" where I put my character controller, 3rd per. camera, collider etc?
@RumpledCode
@RumpledCode 3 года назад
That depends entirely on what and how you plan to implement in your game. Unfortunately, I cannot really answer your question :/
@nikunjsaraf5150
@nikunjsaraf5150 3 года назад
Best tutorial! Thanks a lot
@robocognition8319
@robocognition8319 2 года назад
Nice tutorial. Thanks for help
@BoxxylovesU
@BoxxylovesU Год назад
hmm to who do I assign the player controller script 🤔
@sufyana.2996
@sufyana.2996 3 года назад
love you man!
@krobinide9641
@krobinide9641 3 года назад
It doesnt quite work for me. So i got the menu working perfectly fine and i have picked the model i want, but when i click the start button in the selection scene, it does not use the selected character. Instead it chooses the first element in the GameManager (Load Characters Script). Please help me.
@krobinide9641
@krobinide9641 3 года назад
Its ok im so sorry. I found out that i had to put public void start() on my load character script instead of void start().
@krobinide9641
@krobinide9641 3 года назад
@P h o e n i x i fixed it days ago and yes adding build to scene will work.
@BrivsTheInternet
@BrivsTheInternet Год назад
i know this is a year later but how did you fix it? I have the same problem and i tried adding the public void start and it still didnt work
@krobinide9641
@krobinide9641 Год назад
@@BrivsTheInternet did you add the scenes to the build? it has to be in order as well
@BrivsTheInternet
@BrivsTheInternet Год назад
@@krobinide9641 yeah I did it's still not working for me idk why. I copied the video exactly. Did you make any changes to the code or did you copy it exactly too?
@fatihakbayrak2392
@fatihakbayrak2392 3 года назад
very good bro, go on
@PoisonGamesSRB
@PoisonGamesSRB 3 года назад
Thank you, nice one :D Hvala
@Gamer-l4v
@Gamer-l4v 10 месяцев назад
good man for link the this menu😏
@glazed9110
@glazed9110 3 года назад
Great tutorial! I can see that my code is working in the inspector, but I don't see my models appearing in the game view (even though I see it fine in the scene view). Any ideas on how to fix this?
@RumpledCode
@RumpledCode 3 года назад
Have you checked the position of your camera?
@glazed9110
@glazed9110 3 года назад
@@RumpledCode Yes I have. I can see the model in the camera preview, but still can't see it in the game view..
@glazed9110
@glazed9110 3 года назад
I fixed it! I had to change my render mode to screen space - camera, as for some reason the overlay mode wouldn't work.
@QuizHarry1
@QuizHarry1 3 года назад
Pozz brate Hvala!
@GeniusK
@GeniusK 2 года назад
thanks
@Blinkers2007GameDev
@Blinkers2007GameDev 2 года назад
thanks.
@yousefyousef495
@yousefyousef495 2 года назад
this is lit !!!
@sunilshetty5510
@sunilshetty5510 3 года назад
Please make a video on how to add this player on map
@Madarauchiha-jn3cb
@Madarauchiha-jn3cb 9 месяцев назад
yo quiero que cabie de skin como en roblos al ver de frente un maniqui puedes cambiarte de skin
@justlaugh5932
@justlaugh5932 Год назад
Thank you Brother
@minecraftabdorahemen6228
@minecraftabdorahemen6228 Год назад
thank you brother
@_UNKNOWN
@_UNKNOWN 3 года назад
Thanks for this
@doganinds
@doganinds 3 года назад
thank You very much ♥
@yassenbel7733
@yassenbel7733 2 года назад
Thanks so much
@mibforunity
@mibforunity 2 года назад
Thanks
@levelup3601
@levelup3601 3 года назад
Very very good
@ez4noobs950
@ez4noobs950 2 года назад
thanks bro
@user-ns6yi1dz6x
@user-ns6yi1dz6x Год назад
visual scripting plez
@user-ns6yi1dz6x
@user-ns6yi1dz6x Год назад
why is there no visual scripting version I looked everywhere but i cant find it
@mbdesign8118
@mbdesign8118 3 года назад
good
@bujinkanatori
@bujinkanatori 3 года назад
It was deceptive easy. You skipped a lot of things obvious to experienced unity user, but... hey, I have used unity a lot, but long time a go, so I am not a total newbie, but I have problems with your canvas, buttons, and little things. Code is easy.
@alfredraboy
@alfredraboy 3 года назад
can you put the code in the comment please
@saswatamohanta1023
@saswatamohanta1023 3 года назад
its better if you watch and copy you won't learn anything from copy pasting
@sunilshetty5510
@sunilshetty5510 3 года назад
@@saswatamohanta1023 agree, but I also need the code 😜
@yashc7562
@yashc7562 3 года назад
@@sunilshetty5510 The link is in the description for all of the copy-pasters.😀
@alfredraboy
@alfredraboy 3 года назад
@@saswatamohanta1023 ok
@hasan-bx2vv
@hasan-bx2vv 3 года назад
@@yashc7562 where can i find it pls
@catheadyt282
@catheadyt282 3 года назад
does this work with roblox?
@bowl1858
@bowl1858 2 года назад
This is an amazing tutorial man but i hate your unity setup
@29oppman
@29oppman 3 года назад
scripted worked very well, however virus scanner detected a threat
@RumpledCode
@RumpledCode 3 года назад
What? What got detected as a virus?
@for-marks6820
@for-marks6820 Год назад
explain from scratch shit is not well understood
Далее
The Most Fundamental Concept in Unity
9:50
Просмотров 47 тыс.
I Tried To Beat Minecraft Backwards
18:53
Просмотров 1,2 млн
Character Selector in Unity
29:20
Просмотров 12 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 704 тыс.
How to ACTUALLY get into Gamedev
14:01
Просмотров 714 тыс.
Learning C++ by making a Game... in 1 Week?!
10:14
Просмотров 427 тыс.
CHARACTER SELECTION with SCRIPTABLE OBJECT in Unity
11:11
Can AI code Flappy Bird? Watch ChatGPT try
7:26
Просмотров 9 млн
Маленькая батарея в самсунг
0:31
Nokia imba #trollface #sorts
0:31
Просмотров 4,6 млн
#samsung #retrophone #nostalgia #x100
0:14
Просмотров 15 млн
📱магазин техники в 2014 vs 2024
0:41
Всё о блокировке YouTube
24:27
Просмотров 107 тыс.