Hey, I found an error, take this bit of code, I did to get around it.
SceneManager scene = device.SceneManager;
LightSceneNode myLight = scene.AddLightSceneNode();
myLight.Position = new Vector3Df(17.00f, 17.00f, 0.00f);
Light lightData = new Light();
lightData.DiffuseColor = new Colorf(0.00f, 0.00f, 1.00f, 1.00f);
myLight.LightData.DiffuseColor = lightData.DiffuseColor; (Should be: myLight.LightData = lightData; That gives a read only error.)
Now, Lightdata is not supposed to be read only, but it is. I would think that is why there is a Light type, also in Irrlicht, there is a SetLightData. I could likily fix the issue myself, but I thought I would also pass it along.
I want to thank you for all your hard work, and I am so grateful you made this wrapper.
Edit: I came across another class that has a property that also should not be read only, Light.Type. As Light is just a class that only holds data, , all of its properties should not be read only.
New Edit: I don't know how to set a light type in a scene, as it is read only too. I tried:
LightSceneNode mySpotLight = scene.AddLightSceneNode();
mySpotLight.LightData.Type = LightType.Spot; (Wont work, LightData.Type is read only.)
New Edit: I found it, by going to the definition, should have done that first, its mySpotLight.LightType = LightType.Spot;
New Edit: I looked over the Light definition, and it has a few read only properties, though I don't know why. Could you explain please why that is? I don't understand, here they are.
public bool CastShadows {get; }
public Vector3Df Direction {get; }
public Vector3Df Position {get; }
public float Radius {get; }
New Edit:
I did some looking at the wrapper source, and I think it may be you had no choice, unless you wanted to make translation functions. It may be that you just left the Light class in there because it was in Irrlicht, and it is no longer needed. I just wont use it any more, as the book does for Irrlicht using the ILightSceneNode->setLightData() function.
Thank you for your time.
if (Try()) Do(); else DoNot();
