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.
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.
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
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!
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
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
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.
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?
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 :)
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
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.
@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.
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 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
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.
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
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.
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
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..
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?
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?
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.
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 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.🙏🙇
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, 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
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)
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?
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?
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?
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
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?
These tutorials of your are way more informative than my uni studies
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
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 was starting to get into the spritesheet madness and I wondered how it should be done, thank you so much, keep it up!
Thank you, this was very helpful
@Judah Luke scam
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
oh my god, this is how you do a tutorial video. Thank you so much, so much useful information without wasting any time
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!
The start was exactly my thought proccess
Very well explained, straight to the point and you show everything so we don't get lost on the way!
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
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!
great tutorial really flushed out some things I didn't quite understand
After days and days searching, finally I found!!!
Nice! Hope it helps :)
I've been having so much trouble with my project. this had helped alot thank you.
thank you for making this! I've been looking for someone to do a clean explanation of this type of implementation + code EVERYWHERE
The best tutorial of this cathegory. Eactly what I needed and straight to the point... New sub! Keep it up bro :)
Appreciate you!
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
omg really amazing contents, keep up the good work!!!
This tutorial was really good! Thank you for uploading this!
Np, happy to hear!
This is a pretty useful tutorial. Thank you for that.
Thanks for the kind words!
Thank you, you deserve a lot more subscribers!
❤
Really good video man, your tutorials are incredible
Just what i needed, thanks! Keep up the awesome tuts!!
Appreciate it 🙏
Thanks, this video really helped a lot. Great explanation and was able to setup a nice character creator. Subscribed!
Thank you so much, very helpful and you are very good at this
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
Really cool video for studing, thanks
that given means you have to have the sprites already ready glad i decided to do EVERYTHING myself
Thanks it's very helpful for my next game.thanks a lot
Sounds like lumpy space princess....i love it
this is the best insulting comment I've gotten 💘
Hi! Brazilian here! Good tutorial sz
Thanks for this tutorial it's really helpful!
Amazaing tutorial. Thank you for making that! I wish you best luck in making new videos!
Thanks I appreciate that! Hope it helped!
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.
Fantastic! New channel to binge
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!
Thank you very much! Very good tutorial!
🙏Thanks friend, appreciate it
Thanks, very good explanation!
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?
Thank you, it was so helpful 💙
can we make the player run? or move after selecting it plz to that for part 2
Very useful. Thanks!
You bet!
Noice tutorial. Like the outro music too
Awesome, thanks.
You bet!
Nice tutorial, thanks.
Informative and fun. Thanks a lot
Nice video bro it helped a lot
Dudeeee, you are genius. I buy a course from you if you have!!!
Just what I need!
Love to hear it!
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
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
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.
@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.
Fantastic lesson! But I would really like to see an improved version with JSON or XML serialization of saves 🙏🙏🙏
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.
Great tutorial
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
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.
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
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.
You can't use PrefabUtility in a build. Do you have a fix for this?
Perfect
u saved ma life
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!!!!!
Man that it what i need! thx!
Glad it could help!
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..
Thanks a lot!
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?
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?
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.
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.
I hope this works with like a color swapper, because this would be perfect.
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 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.🙏🙇
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?
ArgumentException: Can't save persistent object as a Prefab asset. How do i fix that?
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
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)
this is fine, but what about changing animated spritesheets
awesome vid ngl
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?
1:55 XD
I wish more teachers were like you :
ty so much
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?
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
It's only on Edit mode, have a metod to use the same plan in a build?
Is there a way to customize pixelart frame animation in any smart way?
hey it did replaced the sprite, but spawn on different location, any idea how to fix it?
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
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
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/
Hello! How to make an animator handle many sprite renderers?
Great video. Thank you.
what was that 2nd rpg shown in the intro
How can I do the same but from a JSON file?
could you not use overlayed sprites?