modular-avatar icon indicating copy to clipboard operation
modular-avatar copied to clipboard

No compilation warnings for expression menu-related objects.

Open IlexisTheMadcat opened this issue 1 year ago • 10 comments
trafficstars

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 avatar Feb 13 '24 04:02 IlexisTheMadcat

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.

IlexisTheMadcat avatar Feb 13 '24 04:02 IlexisTheMadcat

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 avatar Feb 13 '24 06:02 bdunderscore

And, what version of Modular Avatar are you using?

bdunderscore avatar Feb 13 '24 06:02 bdunderscore

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 avatar Feb 13 '24 23:02 IlexisTheMadcat

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.

IlexisTheMadcat avatar Feb 13 '24 23:02 IlexisTheMadcat

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 avatar Feb 17 '24 10:02 bdunderscore

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

image

bdunderscore avatar Feb 17 '24 10:02 bdunderscore

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

bdunderscore avatar Feb 17 '24 10:02 bdunderscore

image image

IlexisTheMadcat avatar Feb 17 '24 21:02 IlexisTheMadcat

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

bdunderscore avatar Feb 18 '24 11:02 bdunderscore