Yo bro your tutorials are really well made and super informative. I'm learning Game dev by myself from zero. But your videos are really helping me ease into developing my own games
Awesome I hope they help! Keep working at it, it can seem like a lot to learn when starting, but game dev isn't about how much you know, it's all about being able to learn what you need to know. Every game is different.
I spent DAYYSS trying to figure out how to get unity to save my customized character and I FINALLY just realized it earlier today, AND NOW THAT I DID! your video came up as a recommended -___- the universe mocks me fml.
Also, I don't know why, when I pressed Randomize it skipped the last body part always, so I did this instead: public void Randomize(){ currentOption = Random.Range(0, options.Count); //I changed this line, just deleted -1 bodyPart.sprite = options[currentOption]; } So it works now
8:46 Why not use modulus? Ex. "bodyPart.sprite = options[currentOption % options.Count];" I'm relatively new to coding and game design, so I appreciate any details you provide in your answer. Great tutorial! Keep up the good work!
You totally can! From a performance standpoint its so minor that its totally irrelevant, which means at times like this it comes down to clarity and preference. I wouldn't say using a modulo is "complex" by any means, but in terms of reading through code, it will definitely give some pause to understand how it works. The result of what I use in the video is the same, just reads differently
Great video, loved it. One thing that I would suggest with handling the option overflow would be modular arithmetic. currentOption = (currentOption++) % options.Count It avoids having to wrap that reset check in the if statement!
You made my game a lot better btw Edit: I have been trying to do something related to this for a whole 2 months now! Also if you do some modification it can change the color of the sprite too
I'm curious how would i save the player customization with JSON ? Is there any tutorial ? Also great video, exactly what I was looking for. And I see that you finally have a more time for youtube :D
I've seen projects that save out assets to an external file and load on game startup, I don't have a specific tutorial (I can look into making one down the road). I'd look up PlayerPrefs, its a simpler built in Unity solution that can help out with this! And I'm trying to keep on top of putting out videos, things have just been a little hectic :)
So you started by talking about top down art, then switched to straight platformer? It'd be nice if there was a single tutorial on the whole internet on how to use skeletal animation for the 4 directional movement that you previously talked about in this video.
nice video there thks and how to move the character if its a top down game which need to move up and down and attack skeletal animation as well as the animation window allows only to use one set of animation parts?
One method I suggest, is having two sprites one basic skin and the other a "mask skin", the basic will have all the code, but the mask will just have different skin masks. So if say input=f Play.animation for second torso or robe.
During the development, everything was going fine but when I gave the build command there was a error saying - "Assets\Scripts\CharacterCreator\CharcterCreatorMenu.cs(27,3): error CS0103: The name 'PrefabUtility' does not exist in the current context" . I checked if I hadn't typed "using UnityEditor;" But I did please tell me how can I fix this
#if UNITY_EDITOR PrefabUtility.SaveAsPrefabAsset(avatar, "Assets/nome.prefab"); #endif No inspector do prefab coloque na Tag o valor "EditorOnly" Versão da Unity: 2020.3.21f1
Is there a tutorial on the version you showed at the beginning, like Stardew, without the skeleton? I want to make a character using spritesheet idles/movements, not a skeletal animator, and need a way to swap between different things
What about changing things like the proportions? For example if you make a larger bulkier character and equip a chest plate it'll look a certain way, but if you make a skinny light character and equip the same chest plate it's going to look smaller.
Thank you a lot! I was right in search for a tutorial like this, with a helpful "learn the idea" approach! I also loved the way you show how to use the customized character in another scene. Simple question: saving the player object as a prefab would persist the new prefab even if the game is closed an opened again, or it would be like a "session" prefab? Do you know a link to a source to find out more about the percistency? Thanks!
Yes that's right, it would be a permanent change to the asset itself since we're overwriting it. So it would persist even if closed if using the same file. "Save systems" for games are pretty custom, so I can't recommend an exact way of doing it, but it'd be better to save out the assets chosen by the player for each part and "load" them in from the file when resuming your game.
And what about rotating the player, because that is all front player so the objects are always the same on idle or walking. But what about when you are going north and you need to change to the back?
Is there a way to still incorporate frame by frame animation and still change the outfits? Maybe by layering a new asset on the character every time they change outfit? Frame by frame animations are still smoother and gives more freedom of movement than the skeletal which looks way too cartoony
Thank you sir!!! I was wondering how to customize 2D characters a few days. "It can't be sprite sheet",I am just thinking. I know a little thing about "Skeletal" right now.
This is Amazing Tutorial, But How To Fix this, i can't build this program if there is "using Editor" on My Script Which is my Submit Function not working if Editor / Prefab Utility must be deleted ? Thanks a Lot
This is great, however after loading into the new scene then returning to the character select screen.. it is showing some strange results. Removing some of the sprites from the selectors? Despite the body parts being in the prefab.
This is verryy helpful and is working fine for me but can u please explain me how do I save the prefab after customising in a build? Please it would be very helpful as I have spent a lot of time trying to find an answer..
Hello Sir.i have a question to ask.i need to know how to implement this feature using scriptable object.if there is please tell me or refer me to one of the video that you think will help me.by the way your tutorial are the best.your implementation are easy to understand and straightforward.thank you very much.🙏🙇
@BMo hey man, just a quick questions, how did u combine face changing options with "human head" like when u choose "eye patch or bandana" without proper setup, you lose head sprite completely.. it becomes transparent.. there is specific Head sprite in files, I'm just not sure how to combine both :) Great tutorial, thank you.
Hi, thanks for this tutorial. You specify at the end of the video that saving as new prefab is not the perfect way to do it. How would you suggest to save your customization? Do you have any tutorial for that? Thanks!
Definitely can't do it the way he showed because you won't be able to Build your game when using UnityEditor namespace/methods in your MonoBehaviours. You'd have to use PlayerPrefs to save/load the indices of each body part, or serialize your player gameobject using another save system.
Hey this video was great and helped me out ALOT, thank you! I have a question, when I press the randomiser button it will only randomise once, how can I fix this please? X
Hello BMo, thanks so much for your tutorial, it's exactly what I was looking for. Would it still be possible to achieve the customizations with a single sprite sheet for 2D pixel games?
Any chance you would make a shop tutorial? I'm making a game for my niece and she will be able to swap currency she collects in game to buy customisation options to "Dress up" the character. But I suck at coding and could use a good tutorial 🙂 (My niece is 4 , this is a long term project)
hello friend, its possible make one button only for all body parts? example u create a previous and next button but in the body part u can select which u want by clicking him i dont know if u understood hehe thx nice tutorial
Would it be possible to use a spritesheet for each bodypart, instead of animating the movements of the bodyparts? This would make more sense in a game using pixel art right?
Correct. The way he showed uses UnityEditor namespace, which is not allowed in a build. so to save your character with customization, you'll have to use PlayerPrefs or another serialization system to save and load your options.
I've followed this and it works fine. I'm trying to add my own assets to the system but when I do then it only uses the animations on the first set of sprites. They revert back to the origin and stay there. When the original sprite is cycled in it animates like normal. How would I ensure that the animations are continued across all sprites?
Hi there, I hope you are still active. I'm having problem regarding save/load character skin, do you have any recommendation other ways to save/load to next scene?
can you use something like this method and import weapons that have unique animations? So like a flaming sword that has embers coming off the blade. Or would you have to do something else since sprite renderers can only display still images?
Hello mate, I'm on unity ver. 2020.3.12f1 and I followed the video I believe quite well, however, despite my best efforts the sprites won't change when I click the buttons
id like to control multiple characters at once. id have them on and item bar that i can switch between them to using numbers and/or my mouse scroll wheel. each character will be active in whatever position they are in the world. i simply wish to click on the one i want to control and select where they will go with path finding. i got path finding down (i think). i was hoping if you could help me?
I need a code to change multiple pieces at the same time, like a button that changes the chest and two arms at the same time. You can help me with that?
how would you write a script so that a button can change swap between multiple sprites at once? Like swapping three sprites that make up a pair of shorts
I was following your tutorial and adaped your example for changing my hero characters head part. It basically works - the head sprite is changing according to my selection. However, the animation for the original head part gets lost / stops as soon as I am doing that change. All other parts of my character still animate, but the head doesn't. In this case under Bones a warning "Sprite has no bind poses" pops up - so I think some extra "hidden" bones binding information is needed when chaning a sprite - but how do I add this one if it doesn't exist?
That... is a larger discussion. Its honestly better to implement some sort of Save system, as JSON is human readable, therefore easily editable (maybe that is ok for your project), but they actually can get pretty complicated.
okay so here's my problem. This is all well and good if you're using characters that are animated like this, with skeletal animations manually moving and resizing the body parts. But i AM using sprites. it's a pixelated game. you can break them apart into body parts that you can swap out, but the problem is the frame animations. So i have an empty game object for each type of sprite (hair, eyes, shirt, pants, weapon) because the sprite sheets are broken out like that but there is no customization for these pieces because of the way unity handles sprite rendering. I would need a way to dynamically swap the entire sprite sheet out at runtime in order to customize. how would you go about doing that?
These tutorials of your are way more informative than my uni studies
Yo bro your tutorials are really well made and super informative. I'm learning Game dev by myself from zero. But your videos are really helping me ease into developing my own games
Awesome I hope they help! Keep working at it, it can seem like a lot to learn when starting, but game dev isn't about how much you know, it's all about being able to learn what you need to know. Every game is different.
I spent DAYYSS trying to figure out how to get unity to save my customized character and I FINALLY just realized it earlier today, AND NOW THAT I DID! your video came up as a recommended -___- the universe mocks me fml.
Riperoni
I was starting to get into the spritesheet madness and I wondered how it should be done, thank you so much, keep it up!
oh my god, this is how you do a tutorial video. Thank you so much, so much useful information without wasting any time
I love the little noise when you break the character into parts. It's not often informative videos also entertaining, kudos.
Great tutorial, very clear, simple and generalizable. Can't wait to use it in my project
Thank you, this was very helpful
@Judah Luke scam
Very well explained, straight to the point and you show everything so we don't get lost on the way!
The best tutorial of this cathegory. Eactly what I needed and straight to the point... New sub! Keep it up bro :)
Appreciate you!
In PreviousOption()
Please change "if (currentOption
Thank you for that, I wondered how to resolve that problem
Also, I don't know why, when I pressed Randomize it skipped the last body part always, so I did this instead:
public void Randomize(){
currentOption = Random.Range(0, options.Count); //I changed this line, just deleted -1
bodyPart.sprite = options[currentOption];
}
So it works now
Thank u
thank you for this! i was able to refactor the customize button as a gender selector as well which is what ive been working hours on :D
Awesome! Nice work!
8:46
Why not use modulus? Ex. "bodyPart.sprite = options[currentOption % options.Count];"
I'm relatively new to coding and game design, so I appreciate any details you provide in your answer. Great tutorial! Keep up the good work!
You totally can! From a performance standpoint its so minor that its totally irrelevant, which means at times like this it comes down to clarity and preference.
I wouldn't say using a modulo is "complex" by any means, but in terms of reading through code, it will definitely give some pause to understand how it works. The result of what I use in the video is the same, just reads differently
Great video, loved it. One thing that I would suggest with handling the option overflow would be modular arithmetic.
currentOption = (currentOption++) % options.Count
It avoids having to wrap that reset check in the if statement!
omg really amazing contents, keep up the good work!!!
After days and days searching, finally I found!!!
Nice! Hope it helps :)
thank you for making this! I've been looking for someone to do a clean explanation of this type of implementation + code EVERYWHERE
This tutorial was really good! Thank you for uploading this!
Np, happy to hear!
I've been having so much trouble with my project. this had helped alot thank you.
Really good video man, your tutorials are incredible
Thank you, you deserve a lot more subscribers!
❤
Just what i needed, thanks! Keep up the awesome tuts!!
Appreciate it 🙏
great tutorial really flushed out some things I didn't quite understand
Thanks, this video really helped a lot. Great explanation and was able to setup a nice character creator. Subscribed!
This is a pretty useful tutorial. Thank you for that.
Thanks for the kind words!
Fantastic! New channel to binge
Hi! Brazilian here! Good tutorial sz
You made my game a lot better btw
Edit: I have been trying to do something related to this for a whole 2 months now!
Also if you do some modification it can change the color of the sprite too
Amazaing tutorial. Thank you for making that! I wish you best luck in making new videos!
Thanks I appreciate that! Hope it helped!
I'm curious how would i save the player customization with JSON ? Is there any tutorial ? Also great video, exactly what I was looking for. And I see that you finally have a more time for youtube :D
I've seen projects that save out assets to an external file and load on game startup, I don't have a specific tutorial (I can look into making one down the road). I'd look up PlayerPrefs, its a simpler built in Unity solution that can help out with this!
And I'm trying to keep on top of putting out videos, things have just been a little hectic :)
@@BMoDev PlayerPrefs hmm... okay thanks for info :D
I am also very curious what is a recommended way do save my customized player.
Currently I am using JSON to save all my data
The start was exactly my thought proccess
Noice tutorial. Like the outro music too
Thank you so much, very helpful and you are very good at this
Really helpful!
you're a life saver! It's the perfect base to build my code on :D thanks a lot!!!
thats awesome - I'd love to see your game someday!
Really cool video for studing, thanks
So you started by talking about top down art, then switched to straight platformer? It'd be nice if there was a single tutorial on the whole internet on how to use skeletal animation for the 4 directional movement that you previously talked about in this video.
can we make the player run? or move after selecting it plz to that for part 2
Thanks for this tutorial it's really helpful!
nice video there thks and how to move the character if its a top down game which need to move up and down and attack skeletal animation as well as the animation window allows only to use one set of animation parts?
Very useful. Thanks!
You bet!
One method I suggest, is having two sprites one basic skin and the other a "mask skin", the basic will have all the code, but the mask will just have different skin masks. So if say input=f Play.animation for second torso or robe.
Thank you very much! Very good tutorial!
🙏Thanks friend, appreciate it
Thanks, very good explanation!
During the development, everything was going fine but when I gave the build command there was a error saying - "Assets\Scripts\CharacterCreator\CharcterCreatorMenu.cs(27,3): error CS0103: The name 'PrefabUtility' does not exist in the current context" . I checked if I hadn't typed "using UnityEditor;" But I did please tell me how can I fix this
#if UNITY_EDITOR
PrefabUtility.SaveAsPrefabAsset(avatar, "Assets/nome.prefab");
#endif
No inspector do prefab coloque na Tag o valor "EditorOnly"
Versão da Unity: 2020.3.21f1
@@faelpsyzera Thankyouuuuu!!!!!
Thank you, it was so helpful 💙
Just what I need!
Love to hear it!
Great tutorial
Nice video bro it helped a lot
Awesome, thanks.
You bet!
Thanks it's very helpful for my next game.thanks a lot
Informative and fun. Thanks a lot
Is there a tutorial on the version you showed at the beginning, like Stardew, without the skeleton? I want to make a character using spritesheet idles/movements, not a skeletal animator, and need a way to swap between different things
What about changing things like the proportions? For example if you make a larger bulkier character and equip a chest plate it'll look a certain way, but if you make a skinny light character and equip the same chest plate it's going to look smaller.
Thank you a lot! I was right in search for a tutorial like this, with a helpful "learn the idea" approach! I also loved the way you show how to use the customized character in another scene. Simple question: saving the player object as a prefab would persist the new prefab even if the game is closed an opened again, or it would be like a "session" prefab? Do you know a link to a source to find out more about the percistency? Thanks!
Yes that's right, it would be a permanent change to the asset itself since we're overwriting it. So it would persist even if closed if using the same file. "Save systems" for games are pretty custom, so I can't recommend an exact way of doing it, but it'd be better to save out the assets chosen by the player for each part and "load" them in from the file when resuming your game.
Nice tutorial, thanks.
And what about rotating the player, because that is all front player so the objects are always the same on idle or walking. But what about when you are going north and you need to change to the back?
that given means you have to have the sprites already ready glad i decided to do EVERYTHING myself
Is there a way to still incorporate frame by frame animation and still change the outfits? Maybe by layering a new asset on the character every time they change outfit? Frame by frame animations are still smoother and gives more freedom of movement than the skeletal which looks way too cartoony
Perfect
Man that it what i need! thx!
Glad it could help!
Sounds like lumpy space princess....i love it
this is the best insulting comment I've gotten 💘
Thank you sir!!! I was wondering how to customize 2D characters a few days. "It can't be sprite sheet",I am just thinking. I know a little thing about "Skeletal" right now.
This is Amazing Tutorial, But How To Fix this, i can't build this program if there is "using Editor" on My Script Which is my Submit Function not working if Editor / Prefab Utility must be deleted ? Thanks a Lot
This is great, however after loading into the new scene then returning to the character select screen.. it is showing some strange results. Removing some of the sprites from the selectors? Despite the body parts being in the prefab.
this is fine, but what about changing animated spritesheets
This is verryy helpful and is working fine for me but can u please explain me how do I save the prefab after customising in a build? Please it would be very helpful as I have spent a lot of time trying to find an answer..
Dudeeee, you are genius. I buy a course from you if you have!!!
Hello Sir.i have a question to ask.i need to know how to implement this feature using scriptable object.if there is please tell me or refer me to one of the video that you think will help me.by the way your tutorial are the best.your implementation are easy to understand and straightforward.thank you very much.🙏🙇
@BMo hey man, just a quick questions, how did u combine face changing options with "human head" like when u choose "eye patch or bandana" without proper setup, you lose head sprite completely.. it becomes transparent.. there is specific Head sprite in files, I'm just not sure how to combine both :)
Great tutorial, thank you.
You can't use PrefabUtility in a build. Do you have a fix for this?
Hi, thanks for this tutorial. You specify at the end of the video that saving as new prefab is not the perfect way to do it. How would you suggest to save your customization? Do you have any tutorial for that? Thanks!
Definitely can't do it the way he showed because you won't be able to Build your game when using UnityEditor namespace/methods in your MonoBehaviours. You'd have to use PlayerPrefs to save/load the indices of each body part, or serialize your player gameobject using another save system.
Fantastic lesson! But I would really like to see an improved version with JSON or XML serialization of saves 🙏🙏🙏
u saved ma life
Hey this video was great and helped me out ALOT, thank you! I have a question, when I press the randomiser button it will only randomise once, how can I fix this please? X
I hope this works with like a color swapper, because this would be perfect.
awesome vid ngl
Hello BMo, thanks so much for your tutorial, it's exactly what I was looking for.
Would it still be possible to achieve the customizations with a single sprite sheet for 2D pixel games?
Hey! Here is how Stardew Valley approach this (it is a lot of work): www.spriters-resource.com/fullview/81210/
Any chance you would make a shop tutorial?
I'm making a game for my niece and she will be able to swap currency she collects in game to buy customisation options to "Dress up" the character.
But I suck at coding and could use a good tutorial 🙂
(My niece is 4 , this is a long term project)
Thanks a lot!
hello friend, its possible make one button only for all body parts? example u create a previous and next button but in the body part u can select which u want by clicking him i dont know if u understood hehe thx nice tutorial
Its definitely possible. I'm just cycling through a list, but theres plenty of ways you can do it!
Would it be possible to use a spritesheet for each bodypart, instead of animating the movements of the bodyparts? This would make more sense in a game using pixel art right?
When you buld the game it says that prefab utility doesnt exist in current context
Correct. The way he showed uses UnityEditor namespace, which is not allowed in a build. so to save your character with customization, you'll have to use PlayerPrefs or another serialization system to save and load your options.
I've followed this and it works fine. I'm trying to add my own assets to the system but when I do then it only uses the animations on the first set of sprites. They revert back to the origin and stay there. When the original sprite is cycled in it animates like normal. How would I ensure that the animations are continued across all sprites?
Great video. Thank you.
Hi there, I hope you are still active. I'm having problem regarding save/load character skin, do you have any recommendation other ways to save/load to next scene?
0:16 from which game was this?
Stoneshard
@@BMoDev thanks
can you use something like this method and import weapons that have unique animations? So like a flaming sword that has embers coming off the blade. Or would you have to do something else since sprite renderers can only display still images?
Hello mate, I'm on unity ver. 2020.3.12f1 and I followed the video I believe quite well, however, despite my best efforts the sprites won't change when I click the buttons
id like to control multiple characters at once. id have them on and item bar that i can switch between them to using numbers and/or my mouse scroll wheel. each character will be active in whatever position they are in the world. i simply wish to click on the one i want to control and select where they will go with path finding. i got path finding down (i think). i was hoping if you could help me?
ArgumentException: Can't save persistent object as a Prefab asset. How do i fix that?
I need a code to change multiple pieces at the same time, like a button that changes the chest and two arms at the same time. You can help me with that?
how would you write a script so that a button can change swap between multiple sprites at once? Like swapping three sprites that make up a pair of shorts
I was following your tutorial and adaped your example for changing my hero characters head part. It basically works - the head sprite is changing according to my selection. However, the animation for the original head part gets lost / stops as soon as I am doing that change. All other parts of my character still animate, but the head doesn't. In this case under Bones a warning "Sprite has no bind poses" pops up - so I think some extra "hidden" bones binding information is needed when chaning a sprite - but how do I add this one if it doesn't exist?
SAME
1:55 XD
how to save as json without editior
That... is a larger discussion. Its honestly better to implement some sort of Save system, as JSON is human readable, therefore easily editable (maybe that is ok for your project), but they actually can get pretty complicated.
Could you explain how to implement as Jason or xml
Any advice for using this in a buid? obviously can't use prefab utility and I'm not sure what I'm doing with Json or Xml.
Hello! How to make an animator handle many sprite renderers?
ty so much
okay so here's my problem. This is all well and good if you're using characters that are animated like this, with skeletal animations manually moving and resizing the body parts. But i AM using sprites. it's a pixelated game. you can break them apart into body parts that you can swap out, but the problem is the frame animations. So i have an empty game object for each type of sprite (hair, eyes, shirt, pants, weapon) because the sprite sheets are broken out like that but there is no customization for these pieces because of the way unity handles sprite rendering.
I would need a way to dynamically swap the entire sprite sheet out at runtime in order to customize. how would you go about doing that?
actually, as a reference in your actual video, i need to know how stardew valley handles it's character customization during runtime.