sorry for being not clear. So, I find the closest type “Lamp” in NC with the GetClosestOfType action and cache it as a dynamic var (Of which implementation was a brilliant idea by the way!) Now I need to access a public bool property inside that class “Lamp”, but since “Lamp” is a dynamic variable, I don’t know how to best accomplish this.
I know, I could work around this by scripting certain methods and special actions, but I just wanted to make sure, that I don’t overlook an easier approach.
A pseudo version of the class would be:
1
2
3
4
5
6
7
publicclassLamp:Device(:MonoBehaviour)
{
publicboolactive// Which I need to check inside NC.