Build operates different to launch

Hello again :slight_smile:
My game Herbivore works quite well when launched from editor. But if I’ll play the build…
first scene does what it should, but after loading the first additional scene (new Player)
I can’t get any input (Thouch, Mouse or Keyboard) into the game.
Are there some settings, for multiple scenes I’ve missed?

sorry Gurki

Hay @Gurki! You don’t have to say sorry! Did you use the scripts with for example your input code in all scenes? As far as I know the script must be added to an entity in the scene.

1 Like

I looked into your project and I have to say it’s very difficult to debug your problem since your project is very complex and you use a lot of scripts. What did strike me is that in the launch version the name header is highlighted when the “New Player” scene is loaded. This is not the case in the build version. So possibly the inputfield is not active and because of that choosing letters does not work?

Thanx a lot :smiley:
Yes I do a lot of recycling scripts and the keyboard script is used in a lot of locations.
I unhooked the concatenate checkbox in the publish menue and everything is well again.
So Playcanvas does a single combiend script for each scene? And every script gets concatenated only once?

To reduce the load times, the build process concatenates all the game scripts into a single file so it’s only one network request.

Are you loading and unloading your scripts at runtime? You don’t actually need to do that.

I use the additional scene load thing you’ve intotroduced to me to
get my hirarchy tree down to less than 16MB.
By the way think its the same issue, my first project didn’t work
together with Monaca Cloud IDE

The project has a few issues but it has highlighted an issue in our Editor when there are lots of script files: https://github.com/playcanvas/editor/issues/161

For the moment, keep concatenate disabled while we look into this.

If I’d guessed this, I would have spent more attention when naming my scripts :wink: