Support for Unity Shaders in Rider 2017.2
The last couple of builds of Rider 2017.2 EAP have seen a number of under-the-hood and foundational fixes and updates to the Unity support.
Firstly, Rider will now read options such as the unsafe flag and pre-processor symbols from the mcs.rsp mono compiler response file, so Rider will now know what symbols you have defined, and analyze the correct branch in #ifdef‘d code blocks. This change is exciting to us because it came from the community – yes, the Unity support is open source, and we accept pull requests!
Secondly, we’ve made significant improvements to the ShaderLab parser. We’re not just doing syntax highlighting of .shader files, but we also parse the file and build syntax trees which we can use for syntax error highlighting, and going forward, inspections and analysis. Unfortunately, our parser wasn’t complete, and could highlight correct code as a syntax error. The parser now understands the file format a whole lot better and you should no longer see incorrect code (barring the occasional bug of course). We also highlight pre-processor errors and warnings correctly.
If you’ve previously disabled “advanced ShaderLab parsing” in options due to incorrect errors, please re-enable and restart (we’ll be removing this option soon, so the more testing and feedback we can get first, the better). And we’d like to thank the nice folks at Unity for their help with making sure we’ve got the whole file format covered.
Speaking of parsing, we’ve put a lot of effort into foundational work on parsing CGPROGRAM blocks and .cginc files, too. Up until now, our syntax highlighting was based on keywords, but we’re now parsing the Cg/HLSL language directly. We’re not yet complete with the language parsing, so we’re not yet showing error highlighting for syntax errors, but we now have much more accurate syntax highlighting, especially around handling pre-processor directives. This is the first step towards full support of Cg/HLSL, such as rich code completion, navigation, and inspections.
And finally, a nice little feature to end on. ShaderLab files now highlight color values in the editor, and hitting Alt+Enter will allow editing, with a color palette picker.
Please download Rider 2017.2 EAP and give the new build a try!
Subscribe to Blog updates
Thanks, we've got you!
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…
OSS Power-Ups: bUnit – Webinar Recording
The recording of our webinar, OSS Power-Ups: bUnit, with Egil Hansen and Steven Giesel, is available. This was the twelfth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webi…
Accelerating Your Testing Workflow with Unit Test Creation and Navigation
Unit tests play an important role in our daily development workflow. They help us ensure our codebase's correctness when writing new functionality or performing refactorings to improve readability and maintainability. In the process, we often create new test files that accompany the p…
Introducing Predictive Debugging: A Game-Changing Look into the Future
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've always strived to improve the art of debugging. Besides the more standard things you expect from a de…