hippogamesunity / HeroEditor4DHub

10 stars 0 forks source link

assign EyesRenderer and EyesbrowsRenderer #37

Closed yobonill closed 2 years ago

yobonill commented 2 years ago

Hey, Oleg, I'm trying to make a button that resets the character to some default appearance, I'm using the file CharacterAppearance.cs as an example since it looks like that file does exactly that.

But, I'm receiving a console error stating that I probably need to assign EyesRenderer and EyesbrowsRenderer in the inspector.

I was looking at your example in the FantasyHeroes Scene, but you never reset character appearance, just wearable stuff unknown

I didn't check if there were any other unassigned errors with the CharacterAppearance file example. If you need any other additional information let me know.

hippogamesunity commented 2 years ago

Hi! How can I reproduce this error? There is currently not way to reset appearance rather that restoring it from json or instantiating a new character.

ResetEquipment removes all equipment from a character. You can't do the same for appearance, unless you want to get a characer with no face.

yobonill commented 2 years ago

You can use the CharacterAppearance.cs as a reference. Is the one I'm using.

There you set "default" values for each body part, then you try to set up each part with those values.

If you want to reproduce that, you only need to call the Setup function in that file, passing the character reference. That throws the error.

image

Maybe I'm doing something wrong, I'm not an expert, learning in the process

hippogamesunity commented 2 years ago

This should fix it:

image

image

yobonill commented 2 years ago

Let me try it right now.. give me a few minutes (just in case this is necessary to know):

So, What Am I exactly trying to do?

I just want to create a character that can be modified by the user, (without armors and weapons), just let the user change the appearance of their character, save those values, and assign them to their character within the game (in another scene).

I already do this with armors and weapons, I love your asset, I will be using them in most of my future games.

yobonill commented 2 years ago

Ready!!..

I added a reset for the beard since it is not there (character.Beard = null;).

Now that I see your code, I understand where the problem was, which means I will be able to change anything now.

This issue is solved :)