light detection in scripting - C#