Hi,
We are using Jenkins on a Mac (10.15) to build our Unity projects, and when we run a build from the following command-line on a fresh clone:
-nographics -batchmode -quit -executeMethod JenkinsBuild.BuildIOSDev
all of our SVG Icons are imported as white squares. We are using the Vector Graphics package 2.0.0 preview 12.
When we either launch the Unity Editor to import a freshly cloned project, or drop the -nographics as in the following, our SVG Icons import fine.
-batchmode -quit -executeMethod JenkinsBuild.BuildIOSDev
Is it a requirement for SVG Importing that we run our command-line builds with a graphics context (without -nographics)?
Thanks.
Certain textures don’t import properly because they require a GPU for the texture generation + multisampling. The -nographics option does not initialize the graphics device, which means there isn’t a GPU available under that mode.
So yes, it is a requirement.
The fact that there is no indication in the build log that this is the case should be considered a bug in my opinion. Seeing
Importing myasset.svg: WARNING: No GPU detected, asset will be incomplete
in the log would have saved me a week of troubleshooting, trying to understand why it worked locally but not in the pipeline in Docker.
I realize this is a pretty old question, but this issue was fixed for me by upgrading to Vector Graphics package version 2.0.0-preview.18.
It looked like the issue only occurred for me when I used a Unity Image component that had the maskable flag on and an SVG as its sprite.