Lighting and MaterialPreset
Scene3D currently supports ambient lighting plus a directional light.
Directional Light
sunEntity is scene.CreateEntity("Sun");
sun is sunEntity.AddDirectionalLight();
sun.SetColor(Color(1.0, 1.0, 1.0, 1.0));
sun.SetIntensity(1.2);
MaterialPreset Values
modelRenderer.SetMaterialStyle(MaterialPreset.Unlit);
modelRenderer.SetMaterialStyle(MaterialPreset.Lit);
Unlit: color and optional texture, no directional lightingLit: ambient plus single directional light contribution
No Numeric Presets
Use enum values only:
MaterialPreset.UnlitMaterialPreset.Lit
Do not use raw integers like 0 or 1.
Next Steps
- Scene3D Basics - Full scene setup
- Mixed 2D and 3D - Scene3D plus HUD workflow