You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note how the name is split across two lines. The trailing # seems to cause the error:
File "yaml/composer.py", line 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
File "yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "unityparser/parser.py", line 65, in parse_block_mapping_key
raise ParserError("while parsing a block mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a block mapping
in "Example.unity", line 997, column 3
expected <block end>, but found '<scalar>'
in "Example.unity", line 1015, column 5
Happy to submit a PR, but would appreciate some pointers.
The text was updated successfully, but these errors were encountered:
Frankly, the scalar parsing logic comes from Pyyaml library(which does not preserve comments, but it does parse them out apparently) so it does not surprise me that the comment gets stripped out.
See: https://docs.unity3d.com/Manual/UnityYAML.html "UnityYAML does not support comments."
For example, GameObjects' names can contain
#
. In a scene file, it may look like this:The Unity editor shows this in the UI as
Hello # World
, but unityparser will just extractHello
.But I actually found this issue because of the following parsing error. An example scene file:
Note how the name is split across two lines. The trailing
#
seems to cause the error:Happy to submit a PR, but would appreciate some pointers.
The text was updated successfully, but these errors were encountered: