Trouble shooting steps in Unity
Hi, I have reposted the following from the Unity forum
"Hi I exported the xaml from inkscape and then opened it in Blend for VS 2013 Preview. I copied the grid tags from the tux sample posted earlier but i get the error mentioned above in the editor when i press play. When the xaml file is first added to unity I did see a different error. I understand the xaml has to be parsed ... not sure how to re-invoke that step from within unity. "
Okay I see now by just by re-saving the file the real errors show up - for example
[DX9] Assets/XAML/Kids_ZooFun_ColoringBook_inGame.xaml
Parsing MatrixTransformh.Matrix (@22,0)
, expected (1, 3)
XAML code - http://pastebin.com/cAyErUab
I am not sure where to start looking to determine what this error means?
iByte
.ps also Would you point me to a feature in VS XAML editor to reformat the XAML file so it is not all mostly on one line as written by Inkscape. UPDATE: Found it Ctrl+K+D
"Hi I exported the xaml from inkscape and then opened it in Blend for VS 2013 Preview. I copied the grid tags from the tux sample posted earlier but i get the error mentioned above in the editor when i press play. When the xaml file is first added to unity I did see a different error. I understand the xaml has to be parsed ... not sure how to re-invoke that step from within unity. "
Okay I see now by just by re-saving the file the real errors show up - for example
[DX9] Assets/XAML/Kids_ZooFun_ColoringBook_inGame.xaml
Parsing MatrixTransformh.Matrix (@22,0)
, expected (1, 3)
XAML code - http://pastebin.com/cAyErUab
I am not sure where to start looking to determine what this error means?
iByte
.ps also Would you point me to a feature in VS XAML editor to reformat the XAML file so it is not all mostly on one line as written by Inkscape. UPDATE: Found it Ctrl+K+D
Re: Trouble shooting steps in Unity
I found one of the problems, it seems that our parser doesn't understand this syntax:
It needs the commas,
We have to fix this but after manually adding the commans, it seems that the .xaml still doesn't display. Will continue investigating.
Code: Select all
<MatrixTransform Matrix="1.25 0 0 -1.25 -862.8501 803.55579"/>
Code: Select all
<MatrixTransform Matrix="1.25, 0, 0, -1.25, -862.8501, 803.55579"/>
-
sfernandez
Site Admin
- Posts: 3154
- Joined:
Re: Trouble shooting steps in Unity
We don't have PathGeometry implemented, but you can use Path Markup Syntax directly as the contents of Path.Data property, it would be automatically converted to an efficient StreamGeometry object. StreamGeometry objects can also be defined as resources.
Instead of:
You can have:
Instead of:
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.Resources>
<PathGeometry x:Key="clipPath" Figures="m 883.5369 339.1515 404.9269 0 0 53.7828 -404.9269 0 0 -53.7828 z"/>
</Grid.Resources>
<Path Fill="#FF663300">
<Path.Data>
<PathGeometry Figures="m 920.9727 420.8907 c 118.991 9.3484 238.7545 7.9603 357.7819 0.004 20.1716 -1.3484 34.4531 -16.7306 36.6409 -36.4725 3.5538 -32.0661 5.1851 -65.7938 -0.03 -97.7565 -3.1495 -19.3064 -16.3267 -34.9443 -36.6202 -36.2568 -118.995 -7.694 -238.8399 -9.6199 -357.7827 0.005 -20.0498 1.6223 -34.5819 16.6553 -36.5859 36.5094 -3.2908 32.6021 -5.4318 65.2232 0.0374 97.7358 3.2471 19.3039 16.3519 34.6447 36.5584 36.2318"/>
</Path.Data>
</Path>
<Path Data="{StaticResource clipPath}" Fill="Red"/>
</Grid>
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.Resources>
<StreamGeometry x:Key="clipPath">m 883.5369 339.1515 404.9269 0 0 53.7828 -404.9269 0 0 -53.7828 z</StreamGeometry>
</Grid.Resources>
<Path Fill="#FF663300" Data="m 920.9727 420.8907 c 118.991 9.3484 238.7545 7.9603 357.7819 0.004 20.1716 -1.3484 34.4531 -16.7306 36.6409 -36.4725 3.5538 -32.0661 5.1851 -65.7938 -0.03 -97.7565 -3.1495 -19.3064 -16.3267 -34.9443 -36.6202 -36.2568 -118.995 -7.694 -238.8399 -9.6199 -357.7827 0.005 -20.0498 1.6223 -34.5819 16.6553 -36.5859 36.5094 -3.2908 32.6021 -5.4318 65.2232 0.0374 97.7358 3.2471 19.3039 16.3519 34.6447 36.5584 36.2318"/>
<Path Data="{StaticResource clipPath}" Fill="Red"/>
</Grid>
Re: Trouble shooting steps in Unity
Hi, Thanks for the reply. How would i force Inkscape to use that method when exporting the xaml? Also do you folks have any tips/hints on how to setup the artwork to make it easier to work with in blend and NoesisGUI?
Thanks
Thanks
Re: Trouble shooting steps in Unity
It seems that in newer versions InkScape changed the kind of XAML generated. The new format does not work properly with NoesisGUI. I have created a report to solve this problem.
Meanwhile, it seems that the old mode is still there. You have the open the file inkscape\share\extensions\svg2xaml.xsl and change the following line:
to this one
Could you test your sample and tell me if it is working? (I can't test it myself because Inkscape is unable to import from the xaml you gave me, I would need the original svg).
Meanwhile, it seems that the old mode is still there. You have the open the file inkscape\share\extensions\svg2xaml.xsl and change the following line:
Code: Select all
<xsl:param name="silverlight_compatible" select="2" />
Code: Select all
<xsl:param name="silverlight_compatible" select="1" />
Re: Trouble shooting steps in Unity
Changing that parm lets the outputed xaml display properly in Unity. Would it be possible to get a bug fix for the Matrix parsing error. It is a little tedious to replace those spaces for comma's.
Thanks
Thanks
Re: Trouble shooting steps in Unity
Sure. It will be fixed in the next release. Probably in a few days.
Thanks for reporting!
Thanks for reporting!
Re: Trouble shooting steps in Unity
Hmm I was able to load the last set of xaml exported from inkscape back into inkscape. Perhaps inkscape does not like the grid tag I added previously?(I can't test it myself because Inkscape is unable to import from the xaml you gave me, I would need the original svg).
Edit - Paste-bin removed as the lines were wrapping as they were so long
iByte
Who is online
Users browsing this forum: Ahrefs [Bot], Killian and 2 guests