vrchat-community / creator-companion

The Entry Point for Making Things in VRChat
https://vrchat.com/home/download
64 stars 449 forks source link

[BUG] Changing SDK from world to avatar leaves a breaking define #243

Open Happyrobot33 opened 1 year ago

Happyrobot33 commented 1 year ago

Describe the bug If you create a project with the world SDK and then change it over to the avatar SDK, there is a stray define left in ProjectSettings.asset that makes the SDK not compile

To Reproduce Create a world SDK project Get into the project in Unity Remove the world SDK from the project Tell VCC to add the avatar SDK to the project SDK wont compile anymore

Expected behavior This define should be cleared upon the avatar SDK being added

Desktop (please complete the following information):

Additional context Id rather this be fixed than just hacking it to not be possible through the VCC, since being able to swap these is useful for developing packages that work in both SDK versions

Happyrobot33 commented 1 year ago

This is as far as I got with my own experimentation so far PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone).Replace("UDON;", "").Replace("UDON", ""));

Nidonocu commented 1 year ago

Can confirm, there isn't any 'clean up' of the defines when packages are uninstalled. While this is also a general problem (Amplify and other Asset store packages do this as well), VRC could use the VCC to help clean the define list for its managed packages.