Example #1
0
        public void Start()
        {
            pedestrian_name = transform.GetComponentInParent <PedestrianOverhead>().name;

            InitialisePedestrian();
            pedestrianInterface = PedestrianCompanion.GetPedestrianCompanion(this, pedestrian_name);
            isServerStarted     = pedestrianInterface.StartPedestrianServer(AirSimSettings.GetSettings().GetPort(AirSimSettings.AgentType.Pedestrian));

            if (isServerStarted == false)
            {
#if UNITY_EDITOR
                EditorUtility.DisplayDialog("Problem in starting AirSim server!!!", "Please check logs for more information.", "Exit");
                EditorApplication.Exit(1);
#else
                Application.Quit();
#endif
            }

            //AirSimGlobal.Instance.Weather.AttachToVehicle(this);

            //count = UnityEngine.Random.Range(0, 10);
            pedestrianControls = new PedestrianControls(0, 0);
        }