Ecosystem-2 icon indicating copy to clipboard operation
Ecosystem-2 copied to clipboard

anyone can make it run?

Open xukongwen opened this issue 3 years ago • 4 comments

it seems, everything stop working, only one bonney and can't move or do anything at all.

xukongwen avatar Jul 15 '20 23:07 xukongwen

I left a comment on the "ArgumentOutOfRangeException: Index was out of range" issue that can interest you. With my fix all the population spawn but... the screen stay grey in the scene window. I will look into that later. Qwak Qwak !

CyberDuck79 avatar Oct 17 '20 09:10 CyberDuck79

OK found, the camera is just not set correctly and there seem to have no control on it implemented into the simulation but you just need to set it with these values : position x:160 y:140 z:-69 rotation x:40 y:0 z:0 I can see the bunnies live^^

CyberDuck79 avatar Oct 17 '20 10:10 CyberDuck79

I have it running (thanks to the various fixes) but with a messed up terrain texture in Unity 2020.1.6f1

I was able to fix this by changing the X tiling on the Terrain material to 1.001 (from 1.0) shrug

xX72f6Satu

ninchistudios avatar Oct 25 '20 10:10 ninchistudios

I managed to get it running, here's what I did:

1.) (Thanks to CyberDuck79) The Bunny prefab needs to its materials set manually (they are set to None by default), so you have to go into the Project view and go to Assets -> Prefabs -> Models -> Bunny and then open the one that just says Bunny in inspector view. From here, go to the Materials tab and then you'll see a list of Materials that need to be set. Drag the materials from the Project view into the slots for their corresponding names.

2.) In Scripts/Environment/Map.cs go to line 135 inside the Remove method, and replace this code:


        // If this entity is not last in the list, put the last entity in its place
        if (index != lastElementIndex) {
            map[regionX, regionY][index] = map[regionX, regionY][lastElementIndex];
            map[regionX, regionY][index].mapIndex = e.mapIndex;
        }
        // Remove last entity from the list
        map[regionX, regionY].RemoveAt (lastElementIndex);
        numEntities--;

with this:


        // make sure the map is non-empty 
        if (lastElementIndex >= 0) {
            // If this entity is not last in the list, put the last entity in its place
            if (index != lastElementIndex) {
                // Debug.Log(String.Format("Trying to access map[{0}, {1}][{2}]", regionX, regionY, index));
                // Debug.Log(String.Format("Map length: {0}", map[regionX, regionY].Count ));
                map[regionX, regionY][index] = map[regionX, regionY][lastElementIndex];
                map[regionX, regionY][index].mapIndex = e.mapIndex;
            }
            // Remove last entity from the list
            map[regionX, regionY].RemoveAt (lastElementIndex);
            numEntities--;
        }
  1. ) Go to Scripts/Behaviour/Animal.cs and on line 221, change Environment.RegisterMove (this, coord, moveTargetCoord); to Environment.RegisterMove (this, moveFromCoord, moveTargetCoord);

  2. ) Adjust the tiling on the Terrain material by going to Assets/Prefabs/Materials/Terrain, and using inspector mode, change the Tiling for X from 1 to 1.001.

  3. ) (optional) Adjust the main camera to be positioned at x: 160, y: 140, z: -69 with rotation x: 40, y: 0, z: 0

osilkin98 avatar Nov 24 '20 08:11 osilkin98