Closed kalvinpearce closed 1 year ago
Thanks for the PR @kalvinpearce! Before we review, can you ensure that:
CHANGES.md
with a short description of the change? This sounds like it would go under the "Fixes" section, since it fixes bugs when using Cesium for Unity with com.unity.vectorgraphics
.🙇🏼 I can confirm I have now signed the CLA and updated CHANGES.md
. Please let me know if you'd like me to adjust any wording or formatting of the changelog file.
Looks great to me! Thanks @kalvinpearce 😄
Swapped out the manual casts in the
Resources.Load
calls for their generic equivalent so that Unity won't try to pick an invalidTexture2D
with the same name.This case arose when using the com.unity.vectorgraphics package. As I understand it, the Vector Graphics package overwrites the import type of
.svg
files and they are no longer able to be cast toTexture2D
. This was causing a few of the Cesium editors to throw exceptions and not render anything to the inspector. By using the generic version ofResources.Load
Unity will pick validTexture2D
(in this case, the.png
files rather than the.svg
).