Here is a sample function in C# that maps a distance value between 200 and 300 to the range of 0 to 1:

```c#
float MapDistanceToRange(float distance)
{
    // Check if distance value is within bounds
    if (distance < 200f || distance > 300f)
    {
        Debug.LogError("Distance value is out of range.");
        return 0f;
    }

    // Map distance value to 0-1 range
    float mappedValue = (distance - 200f) / 100f;

    return mappedValue;
}
```

This function takes in a float value `distance` and checks if it falls within the range of 200 to 300. If the value is out of range, an error message is logged and the function returns 0. Otherwise, the distance value is mapped to the 0-1 range using a simple formula. The mapped value is then returned. 

You can call this function from any other script in your Unity project to map distance values to the desired range.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence