suzuryg / face-emo

FaceEmo: Face emote configuration tool for VRChat Avatars 3.0
https://suzuryg.github.io/face-emo/
Other
46 stars 5 forks source link

fix: Allow for saving inside prefabs, fixes #73 #104

Closed GotoFinal closed 6 months ago

GotoFinal commented 6 months ago

Based on https://stackoverflow.com/questions/65001961/unity3d-how-to-save-part-of-a-prefab-instance-as-a-prefab Might require more testing to make sure it always behaves as expected. I tested on my prefab setup, where I removed the emoface prefab from the actual prefab and scene and then:

  1. Used Apply To Avatar on this clean prefab instance - worked like before
  2. Used Apply to Avatar again on this instance - worked like before overriding the old object.
  3. Saved that instance as an actual prefab
  4. Used Apply to Avatar again on this instance - it saved the changes directly to actual prefab, updating all other variants using this prefab. (this crashed before)

The solution might seems a bit hacky I guess... But personally it does what I would like the tool to do.

suzuryg commented 6 months ago

Thanks for the suggestion! Actually, there is an implementation for #73 that I had been working on locally, but I had not pushed it to github... I have just pushed it and created a PR (#106) , so I would like to close this PR. I may make some code rework on this one before merging.