Unity-Technologies / EndlessRunnerSampleGame

Repository for the Endless Runner Game Sample (Trash Dash)
373 stars 142 forks source link

Assets dont load in windows build #26

Open shahanpower opened 3 years ago

shahanpower commented 3 years ago

I tried to run the game for a standalone windows build but when i press the run button the assets dont load. Can not figure out the solution to the problem.

You can see in the image that the game starts but no asset is loaded. The works on the editor but not after build.

image

crawfis commented 3 years ago

Did you copy over the Asset Bundles or Addressable Assets? See: https://github.com/Unity-Technologies/EndlessRunnerSampleGame/wiki/Testing-and-Building I switched to Addressables and need to copy of the files/folders from Libraries/unity.addressables.com/...

shahanpower commented 3 years ago

@crawfis Hi, I have the latest project from the git project so I am working with addresables. could you tell me what to do exactly for the addresables to work. I couldnt understand what you said about copying

shahanpower commented 3 years ago

Also do you know how to skip the tutorial by defauld in the game?

crawfis commented 3 years ago

You need to: 1) Build them Addressables->Groups->Build 2) Copy over Libraries/com.unity.addressables/aa into the {Game}_Data/StreamingAssets/aa 3) You may need to move some stuff around to make sure the link file is there. Addressables are great when you get them working, but >!&^^!&^&*!

In TrackManager.cs (SpawnFromAssetReference) I need to replace this item to fix a bug. Not sure if it is something I did our the latest version of Addressables and Unity. //AsyncOperationHandle op = reference.LoadAssetAsync(); AsyncOperationHandle op = Addressables.LoadAssetAsync(reference);

crawfis commented 3 years ago

Also do you know how to skip the tutorial by defauld in the game?

@shahanpower. No easy way to automatically skip the Tutorial. There is a flag in the save.bin (which I just converted to Text) which indicates whether it is done or not. We skip all screens until we get to the game in one of our modes (exercise / rehab games). We copy a stored save.bin over to Persistent storage if it doesn't exit. This will preload all of our themes, etc. Otherwise, just hack the code and after Save.bin is read, set tutorialDone to true.

beeryok commented 1 year ago

@crawfis Sir, Do you able to play the game? When I build the game and play it, nothing loads. 1

crawfis commented 1 year ago

@beeryok You need to make sure you build the Addressables first. Unity will automatically do it after that (sometimes :-)).

beeryok commented 1 year ago

@beeryok You need to make sure you build the Addressables first. Unity will automatically do it after that (sometimes :-)).

Its work! I followed your instructions above and it worked!

hungpqw commented 2 months ago

I can play in the editor but couldn't get it play when build in Windows. Nothing load. Could you guys help me?