How to use PlayerSpotLightConfig
_isLight = data.ContainsKey("Light");
if (isLight) // Checks if the Light flag in the file
{
lightConfig = new PlayerSpotLightConfig(data); // if so loads the light config properties from the file
}
When the Light flag is in the asset definition file, Unturned searches for the properties SpotLight_Enabled, SpotLight_Range, etc of the PlayerSpotLightConfig
...
"Light"
"SpotLight_Enabled" "true"
"SpotLight_Range" "16"
"SpotLight_Angle" "50"
"SpotLight_Intensity" "0.7"
...
Extra reading:
Official documentation for PlayerSpotlightConfig
Sources:
PlayerSpotlightConfig.cs
#playerspotlightconfig #example #light