- Home /
Answer by Honorable-Chow · Mar 08, 2017 at 09:16 AM
I couldn't get the Controls property to accept game objects for the array. I created a property directly in a script. After that I was able to drag items from my scene to populate the array. I then move the items into the FSM Array when the scripts starts.
public GameObject[] Waypoints;
// Use this for initialization
private void Start()
{
var array = FsmVariables.GlobalVariables.GetFsmArray("PossibleWaypoints");
array.Resize(Waypoints.Length);
for (var i = 0; i < Waypoints.Length; i++)
{
array.Set(i, Waypoints[i]);
}
}
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Problem with Accessing Variables from Other Scripts in c#. 1 Answer
Can't create an Collider2D array? 1 Answer
Keep getting null when using Resource.load with a path. 1 Answer