Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGot "found undefined tag" error on parsing prefab file of unity3d #404
Comments
|
I'm wondering how to solve this one too. Unity clearly thinks that the scope of a TAG directive is from the point of declaration to the end of the file. It appears that Psych thinks the scope extends only to the end of the document. Is there a "right" interpretation? |
|
I've seen other YAML parsers with a "default tag" that could be set. Is there not one in psych? |
"found undefined tag handle while parsing a node at line 21 column 5 (Psych::SyntaxError)"
I got this error on parsing unity3d prefab file with parse_stream method.
line 21 is " --- !u!224 &224286004637740336"
I can insert a new line "%TAG !u! tag:unity3d.com,2011: " before every "---" to fix it.
source.gsub(/^(?<!%TAG !u! tag:unity3d.com,2011:\n)^(--- !u![0-9]+ &[0-9]+)$/, "%TAG !u! tag:unity3d.com,2011:\n\\1")But I hope there is a solution in API level.