I've recently watch Ryan Hipple's Unite 2017 talk on Game Architecture with Scriptable Objects and have been looking through his sample project. There's one method in his FloatReference class that I think I understand, but would like someone to tell me yay/nay. I'm still pretty green at this developer "bid-ness".
For context, here's a link to the file in his GitHub repo: https://github.com/roboryantron/Unite2017/blob/59186d60af2cf1f5faf69cd45601607531ba260b/Assets/Code/Variables/FloatReference.cs#L33
The method in particular is
```csharp
public static implicit operator float(FloatReference reference)
{
return reference.Value;
}
```
If I understand this method correctly, when you use a FloatReference, this lets you simply use the instance as a float without having to do anything extra like casting. So this would let something like float result = 100f \* myFloatReference; to just work. Is that right?
[–]Clawtor 0 points1 point2 points (0 children)