bdunderscore / modular-avatar

Other
476 stars 61 forks source link

No compilation warnings for expression menu-related objects. #664

Open IlexisTheMadcat opened 6 months ago

IlexisTheMadcat commented 6 months ago

Hi, I often keep running into errors that the VRChat SDK would normally let me know in the builder before I'd even be allowed to build or test. I believe it's simply because I've opted to use an entirely GameObject-based expression menu and parameter assembly. While I absolutely love the idea of this library for making stuff more modular (I mostly use it internally just because it makes development so much easier), I'd also like for it to warn about expression menu issues. The error below in the console is caused because the VRChat SDK let me start building a test, but because this library essentially bypasses pre-build warnings for expression menu instances, it runs into the error before it can check for it.

image This error-specific solution: Check all icons in menu item objects and set their maximum import size to 256. VRChat SDK does this with an "auto fix" when expression menu assets are used. Another potential error: "-Parameter- is not defined in avatar parameters object" or a similar warning. This appears when a menu item is attempting to control a parameter that is not defined in the final parameters asset during building. This can happen because one had forgotten to include the parameters either inside their parameter asset, or in the hierarchy as a Merge Parameters component.

IlexisTheMadcat commented 6 months ago

Also, it's nigh impossible to know which icons are the culprits as nothing tells you. The VRChat SDK fixes the issue on its own, but not even its "select" button (so you can fix it yourself) shows you the items that are causing this warning.

bdunderscore commented 6 months ago

Hmm. This should be handled already by automatically rescaling icons: https://github.com/bdunderscore/modular-avatar/blob/main/Editor/FixupPasses/FixupExpressionsMenuPass.cs#L122

Do you have a reliable way of reproducing this issue?

bdunderscore commented 6 months ago

And, what version of Modular Avatar are you using?

IlexisTheMadcat commented 6 months ago

Hmm. This should be handled already by automatically rescaling icons: https://github.com/bdunderscore/modular-avatar/blob/main/Editor/FixupPasses/FixupExpressionsMenuPass.cs#L122

Do you have a reliable way of reproducing this issue?

The best and easiest way to replicate is by setting the import size of an icon used by a Menu Item to anywhere above 256. In my case, both the original issue and replicated issue have been because the icon was set to 2048 regardless of the actual dimensions of the image.

The version I'm using is 1.8.4, the latest version.

IlexisTheMadcat commented 6 months ago

image This is my menu, which is installed onto a blank menu asset for reading by VRChat in the build phase. "Cosmic Ray", necklace toggle, was using a 2048 icon.

bdunderscore commented 6 months ago

Can you show me the inspector for a texture that causes the issue please? This texture does not cause the issue, for example:

image

bdunderscore commented 6 months ago

This 512x512 texture is also correctly rescaled and doesn't break things...

image

bdunderscore commented 6 months ago

Also - what version of "Non-Destructive Modular Framework" are you using?

IlexisTheMadcat commented 6 months ago

image image

bdunderscore commented 6 months ago

Hmm. Still not able to reproduce - can you show me the Menu Item where you have this icon configured?