Skip to content

Uncomment adding backslashes to HYBRID_V1_CUSTOM_ADDITIONAL_MATERIAL_VARS generation #1586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

JussiKnuuttila
Copy link
Contributor

Commit ee59f50#diff-0b36485c0a23eb2bc631bb8b8ab068c8 in PR #7 commented out the code that adds backslashes to the generated HYBRID_V1_CUSTOM_ADDITIONAL_MATERIAL_VARS macro when Hybrid Renderer V1 is used.

The backslashes are necessary for Hybrid V1 to work correctly when multiple DOTS instanced properties are used. The macro is intended to expand into multiple UNITY_DEFINE_INSTANCED_PROP definitions, which are split across multiple lines and concatenated together using the preprocessor backslash operator. Without the backslash, any UNITY_DEFINE_INSTANCED_PROP definitions after the first are expanded immediately instead, which causes a compile error.

This PR restores the backslashes and adds a comment to explain why it's necessary.

Checklist for PR maker

  • Have you added a backport label (if needed)? For example, the need-backport-* label. After you backport the PR, the label changes to backported-*.

Testing status

Manual Tests: What did you do?

  • Opened test project + Run graphic tests locally
  • Built a player
  • Checked new UI names with UX convention
  • Tested UI multi-edition + Undo/Redo + Prefab overrides + Alignment in Preset
  • C# and shader warnings (supress shader cache to see them)
  • Checked new resources path for the reloader (in developer mode, you have a button at end of resources that check the paths)
  • Other: Tested using bug repro project from FogBugz case 1265852

…VARS generation, to fix Hybrid V1 not working with multiple properties.
@stramit stramit marked this pull request as ready for review August 13, 2020 09:36
@stramit stramit requested a review from a team as a code owner August 13, 2020 09:36
@stramit stramit merged commit 537dc8f into master Aug 13, 2020
@stramit stramit deleted the hybrid/hybrid-v1-fix-multiple-properties branch August 13, 2020 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants