void Start() { InitColorMap(); CreateLineMaterial(); boundingBoxesSubscriber = this.GetComponent <SubscribeBoundingBoxes>(); boundingBoxesSubscriber.AddListener(OnNewBounds); bounds = new Dictionary <int, Bounds>(); }
private void Start() { // Material Resources.UnloadUnusedAssets(); string resourcePath = "Material/HumanTrail"; trajectoryMaterial = Resources.Load <Material>(resourcePath); capsuleHumanPrefab = Resources.Load <GameObject>("Prefabs/CapsuleHuman"); // Trail Render curve = new AnimationCurve(); curve.AddKey(0.0f, 1.0f); curve.AddKey(1.0f, 0.0f); // Subscribe boundingBoxesSubscriber = this.GetComponent <SubscribeBoundingBoxes>(); boundingBoxesSubscriber.AddListener(OnNewBounds); wayPoints = new Dictionary <int, Queue <Vector3> >(); humanGameObjects = new Dictionary <int, GameObject>(); }