emilianavt / VSeeFaceSDK

The VSeeFace SDK for Unity is used to export models in the VSFAvatar format.
149 stars 10 forks source link

Suggestion: Allow Users To Export Models with Custom Scripts #9

Closed VinTechage closed 2 years ago

VinTechage commented 2 years ago

I'm having an issue to where I want to write a script to limit the rotation of bone joints for VSF Avatars for VSeeFace. The Rotation Constraint component in Unity is unable to do this function, and so are the rest of the whitelisted components. I want it to where I can write a custom script that can be exported with a VRM model as part of a VSF Avatar file. I know the whitelisting is meant to prevent users from exporting VRM models as VSF Avatars with components that might break the model. However, I'm working on a project that requires adding functionality that is not part of the default VSeeFace and Unity applications.

emilianavt commented 2 years ago

Hi! Custom scripts cannot be exported inside Unity asset bundles. They only include a reference to the code, which in the case of custom scripts, resides in your Unity project, but was not compiled into VSeeFace. So when loading the asset bundle referring to it, the reference will point at nothing and cause errors. The whitelisting ensures that only components that are available in VSeeFace are used.