Skip to content

fixed compatibiliy with newer Unity versions and URP#12

Open
Pellelle wants to merge 1 commit intojaroslavstehlik:masterfrom
Pellelle:URP_compatibility
Open

fixed compatibiliy with newer Unity versions and URP#12
Pellelle wants to merge 1 commit intojaroslavstehlik:masterfrom
Pellelle:URP_compatibility

Conversation

@Pellelle
Copy link

@Pellelle Pellelle commented Aug 7, 2021

No description provided.

@toxikman
Copy link

These are great changes except some projects don't use the Scriptable Render Pipeline, so maybe stick with the old Camera.onPreRender callbacks in SVGAtlas.cs?

@Pellelle
Copy link
Author

Well, maybe it should just not be merged, as it loses compatibility with older versions. But I would hope this pull request could help others find this fix.

@jaroslavstehlik
Copy link
Owner

That is correct, this would break compatibility with older version of Unity.
This can be fixed with a scripting define symbols.
https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

@toxikman
Copy link

How could you check at compile time for the Scriptable Render Pipeline package? Although I'm using Unity 2020.3 (no SRP package) with the Camera.onPreRender event callback and it seems to work fine with gradients.

@jaroslavstehlik
Copy link
Owner

You could look via reflection if the class in the right assembly exist and if it exist, then you can add that define symbols to the build settings.

@toxikman
Copy link

If you have an asmdef, then you can use this feature to check for an installed package and then add a #define for that particular feature: https://docs.unity3d.com/2020.3/Documentation/Manual/class-AssemblyDefinitionImporter.html#version-defines
I use an asmdef for SVGImporter anyway (and another for the Editor scripts).

@vladkrutenyuk
Copy link

Failed to load '.../Assets/SVG Importer/Example Projects/Curves Demo/Graphics/Space/star.asset'. File may be corrupted or was serialized with a newer version of Unity. :((((((((((((((((((((((((((((((((((((

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants