I was thinking there was an algorithm where you could walk through all usages of that BBParameter and find its strictest possible type that everyone else could use.
EG,
1
2
3
4
5
BBParameter<IList>
BBParameter<IEnumerable>
BBParameter<List<GameObject>>
So IList would be added to the Blackboard first. Since IList implements IEnumerable, we can keep IList. And, since List<GameObject> implements IList, we’d upgrade to List<GameObject>.
At some point (probably due to operator error changing types) this algorithm breaks down… I think its okay to log a warning message and default to whatever the last variable type was.
But I haven’t really thought through this algorithm.
Login
Register
By registering on this website you agree to our Privacy Policy.