void Start() { //set ref managerScript = Ref.getManagerGO().GetComponent <Manager>(); gridScript = Ref.getGridScript(); GameObject activeAgent = managerScript.getActiveAgent(); followPathScript = activeAgent.GetComponent <FollowPath>(); agentPropsScript = activeAgent.GetComponent <AgentProps>(); boxCollider = GetComponent <BoxCollider>(); obstManagerScript = GetComponent <ObstManager>(); predictAheadTimeFrames = (agentPropsScript.cooperationLenght * 2 + 1); getCoveredNodesScript = GetComponent <GetCoveredNodes>(); getCoveredNodesScript.setPredictAheadTime(predictAheadTimeFrames); getCoveredNodesScript.init(); lastNPoints = new List <Vector3>(); }