Hi guys
Sorry in advance for my bad english level.
This week I had a big pb.I had a link to the file, and delete it …
I make backup all the week but, my serialize method doesnt exist now.
I remember my try hard for a successful.
Serialize method
using (XmlWriter writer = XmlWriter.Create(fileName))
{
IntermediateSerializer.Serialize(writer, level.renderer._lightListEmitter, null);
}
My XML file
<?xml version="1.0" encoding="UTF-8"?>
-<XnaContent xmlns:Generic="System.Collections.Generic">
-<Asset Type="Generic:List[Setting.LightEmitter]">
+<Item>
-<Item>
<name>InStory</name>
-<_LightList>
-<Item>
<Createposition>576 384 100</Createposition>
<position>576 384 100</position>
<color>0 0 255</color>
<normal>1 0 0</normal>
<corrector>1</corrector>
<Lenght>768 768</Lenght>
<AxisZ>1</AxisZ>
<InvDir>false</InvDir>
<theta>0</theta>
<renderer>0</renderer>
<nameOfEngine Null="true"/>
<radius>0</radius>
<bounds>768 768</bounds>
<intensity>1</intensity>
<extend>1 1 1</extend>
<additiveblendBool>true</additiveblendBool>
<isFullScreen>false</isFullScreen>
<is_Selectioned>false</is_Selectioned>
<Id_Light>0</Id_Light>
<select>true</select>
<technique>0</technique>
</Item>
</_LightList>
<ID_>0</ID_>
<MaxLight>1</MaxLight>
<MaxLightAutorisation>10</MaxLightAutorisation>
<technique>0</technique>
</Item>
-<Item>
<name>Layer</name>
-<_LightList>
-<Item>
<Createposition>768 384 100</Createposition>
<position>768 384 100</position>
<color>0 0 255</color>
<normal>1 0 0</normal>
<corrector>1</corrector>
<Lenght>768 768</Lenght>
<AxisZ>1</AxisZ>
<InvDir>false</InvDir>
<theta>0</theta>
<renderer>0</renderer>
<nameOfEngine Null="true"/>
<radius>0</radius>
<bounds>768 768</bounds>
<intensity>1</intensity>
<extend>1 1 1</extend>
<additiveblendBool>false</additiveblendBool>
<isFullScreen>true</isFullScreen>
<is_Selectioned>false</is_Selectioned>
<Id_Light>0</Id_Light>
<select>true</select>
<technique>0</technique>
</Item>
-<Item>
<Createposition>768 704 100</Createposition>
<position>768 704 100</position>
<color>0 0 255</color>
<normal>1 0 0</normal>
<corrector>1</corrector>
<Lenght>768 768</Lenght>
<AxisZ>1</AxisZ>
<InvDir>false</InvDir>
<theta>0</theta>
<renderer>0</renderer>
<nameOfEngine Null="true"/>
<radius>0</radius>
<bounds>768 768</bounds>
<intensity>1</intensity>
<extend>1 1 1</extend>
<additiveblendBool>true</additiveblendBool>
<isFullScreen>false</isFullScreen>
<is_Selectioned>false</is_Selectioned>
<Id_Light>1</Id_Light>
<select>true</select>
<technique>0</technique>
</Item>
</_LightList>
<ID_>1</ID_>
<MaxLight>2</MaxLight>
<MaxLightAutorisation>10</MaxLightAutorisation>
<technique>0</technique>
</Item>
</Asset>
</XnaContent>
I have create a library, add my dll into my project reference.
I use [ContentSerializerIgnore].
I load like that
string filename = string.Format("C:/NSOMSettings/Light/light{0}", levelIndex); //Light C:/NSOMSettings/
if (System.IO.File.Exists(filename))
{
renderer._lightListEmitter = game.Content.Load<List<LightEmitter>>(filename);
}
But now no light0.xnb was created
Before my mistake it works perfectly
If you want more information, let me known.
Thank you in advance