Documentation

Learn how to use FlowCanvas

Download PDF Version

Connecting Assignable Types

As explained earlier, “value ports can only be connected to other value ports of the same or of assignable types”.

What this basically means, is that you are able to connect certain value type ports together even though they are not of the exact same type, if they can be converted or casted to that type. This is handled automatically for you and saves you a lot of time. In practice, if the editor allows you to connect 2 ports together then it means it’s possible and you have nothing more to worry about. When such a conversion is taking place, the connection will display an icon indicating the fact. In the following example, a float has been connected to a boolean. As a result, this conversion will result to false since the value is 0 (and true if the value was 1+).

ConnectionConvertion

For your convenience, here are the supported conversions by FlowCanvas and how they are done.

From To Through
Any Primitive Any Primitive .ConvertTo()
GameObject Any Component .GetComponent
GameObject Transform .transform
Any Component GameObject .gameObject
GameObject Vector3 .transform.position
AnyComponent Vector3 .transform.position
A Child Type Base Type upcasting
A Base Type Child Type downcasting
Anything String .ToString()
Yes No Suggest edit
11 of 11 users found this section helpful
Suggest Edit