FlowCanvas Forums › Support › make Custom Code as Custom Node › Reply To: make Custom Code as Custom Node
I guess something like this should do it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | public class CastToGameObjectPositions : PureFunctionNode<Vector3[], List<GameObject>> { public override Vector3[] Invoke(List<GameObject> gameobjects) { List<Vector3> positions = new List<Vector3>(); foreach(GameObject go in gameobjects) { positions.Add(go.transform.position); } return positions.ToArray(); } } |