protected override void OnCreateManager() { Instance = this; base.OnCreateManager(); bootstrap = GameObject.FindObjectOfType <BoidBootstrap>(); positions = new NativeArray <Vector3>(MAX_SPINES, Allocator.Persistent); rotations = new NativeArray <Quaternion>(MAX_SPINES, Allocator.Persistent); numSpines = 0; }
protected override void OnCreateManager() { Instance = this; bootstrap = GameObject.FindObjectOfType <BoidBootstrap>(); // Want to use this but it hangs when I try and access it // neighbours = new NativeMultiHashMap<int, int>(10000, Allocator.Persistent); neighbours = new NativeArray <int>(bootstrap.numBoids * maxNeighbours, Allocator.Persistent); positions = new NativeArray <Vector3>(bootstrap.numBoids, Allocator.Persistent); rotations = new NativeArray <Quaternion>(bootstrap.numBoids, Allocator.Persistent); speeds = new NativeArray <float>(bootstrap.numBoids, Allocator.Persistent); // Needed for the animations cells = new NativeMultiHashMap <int, int>(bootstrap.numBoids, Allocator.Persistent); }
protected override void OnCreateManager() { Instance = this; bootstrap = GameObject.FindObjectOfType <BoidBootstrap>(); }