So I followed this tutorial :
https://www.youtube.com/watch?v=14gQzeOL0Ec&t=5166shttp:// and somewhere around 1h:20m there is a part where Chris place the glasses on the player. I'm trying to use the same approach with my character.
When he wakes up he's only in PJs, but then I create an action to change the visibility of the PJs and make the other clothes visible and everything works perfectly. The problem comes when I load from a previous save where he had the clothes on, my player it's completely naked. I'm not sure what could be the problem.
If any of you know what could cause this problem please let me know
Comments
Now I managed to get clothes saved when I load.
The strange part is in the beginning of the game I make the player change his clothes from PJs to School Clothes, but when he gets back I'm doing the same thing as I was doing in the morning, but the strange part is that he changes the visibility only in the room where he changes the clothes. I'm not sure if I'm very explicit so I made a video so that you can see what I mean.
https://www.youtube.com/watch?v=3tV7Si72brM&feature=youtu.be
Best regards
However, since you're dealing with so many objects, it would be better to instead rely on animation to control what's shown/hidden - instead of manually affecting visibilities through Actions.
Try instead making a new Animator layer uses different animations to control the enabled state of your various MeshRenderer components. i.e. a "School" animation that shows the school clothes and not the PJs, and a "PJs" animation that shows the PJs and not the school clothes.
You can then control the playback of the animation with a single Character: Animate Action, and save that animated state with a single Remember Animator component.
This is my result and what I've found out. I got my character with different clothes, each piece of clothing, has the "Skinned Mesh Renderer" disabled. I created an ActionList for each type the player has to change the clothes.
I did like in the tutorial, I drag and drop each piece of clothing on the action, like in the photo https://imgur.com/a/hdgqsBo.png
Also I set the "Retain in prefab" on the "Constant Id" Component that was generated for the clothes and then hit apply. I did this for every type of clothes. (In my case I have 4 different situations: PJs, School Clothes, Home Clothes and Party Clothes).
I just tested and it was working.
I changed my clothes to "School" and left the room I was in, after that I got back inside changed the clothes to "Home" left the room and it was working.
I had the correct clothes on me, however, I needed to do one more thing so that I could save/load, so I added the "Remember Visibility" and checked the "Retain in Prefab" for this Component to every piece of clothing and when I tried to see if it's still working it was not.
This is what I've been doing :
I started the game, I changed my clothes to "School" and then I went outside the room I was in, I saw my character dressed in the correct clothes, then I went back to the same room, I changed my clothes to "Home" and when I left the room I was seeing that I still got my "School" clothes on, but in the first room I had the correct clothes.
I get the same result as in the video I posted above.
Do you know what could be the problem and the solution. Also if you think that your solution
"However, since you're dealing with so many objects, it would be better to instead rely on animation to control what's shown/hidden - instead of manually affecting visibilities through Actions."
could solve my problem, could you describe it a little bit in more details? Also if you know what could cause this problem, please let me know.
Thank you.
My Unity version is: 2017 .3.1f1 Personal
AC version : 1.60.4
Yes, the player is spawned from the settings manager in both scenes
About the using of a single element and check affect children. This was the way I was doing it before, I had a parent and I was just checking affect children, but I taught that maybe this was the problem, so I tried a different approach.
I'm gonna try doing the Animation method.
If you have any luck on your side, please let me know.
Thank you for your time