At some point Unity started breaking inline objects onto multiple lines (presumedly once they reach a certain line length). This causes the parser to incorrectly begin parsing on the variants: line instead of the desired - keywords: line of the first element of the variants array.
This fixes that by detecting when the shader asset reference spans multiple lines (by looking for an increase in indentation) and skips forward an extra line if that is the case.
At some point Unity started breaking inline objects onto multiple lines (presumedly once they reach a certain line length). This causes the parser to incorrectly begin parsing on the
variants:
line instead of the desired- keywords:
line of the first element of the variants array.This fixes that by detecting when the shader asset reference spans multiple lines (by looking for an increase in indentation) and skips forward an extra line if that is the case.
Example of multi-line inline object reference: