Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Yeah, unfortunately I had to leave the rest of the project files out of the repo. During the development of my game, at some point a bug arose that was catastrophic and would crash the editor every time I opened the project. Even copy pasting the individual files and prefabs into a new project didn't fix it. I ended up uninstalling the unity editor and downloading a new copy and re-installing it. I then rebuilt my project from scratch using only the code from the repo. The thing is, I never figured out what caused the bug, and my current project is identical to the buggy one so  I don't want to risk passing around a project that will crash other people's editors.

If you would like to get my code in the repo running, I can list the settings I used:

(Input System) create a new input object, call it "PlayerInputActions", create an action map and call it "KeyboardMap"

Then add a Vector2 action titled "Movement", Vector2 action titled "MousePosition", Button action titled "MouseLeftClick", Button action titled "MouseRightClick", and a Button action titled "LaunchMissile" 

Physics Layers were set up as follows:

6 - Selection, 7-Navigation, 8-Player, 9-Enemy, 10-Ground, 11-Environment, 12- PlayerProjectiles

Assign your player prefab to layer 8, and player projectile prefabs to layer 12, all  enemy unit and projectile prefabs to layer 9, the ground plane to layer 10 and any obstacles to avoid to layer 11


As for setting up the authoring scripts its actually pretty simple, anything in a folder needs to be assigned to a prefab object, otherwise assign each authoring script to an empty object in the scene. Both player and enemy authoring prefabs require a collider component, a URP base color component and a rigidbody component. Missiles are the same as units but with a few tweaks, make sure in the collider component to tick isTrigger and in the rigidbody component untick use Gravity. For the phalanx and cannon, they both use the projectile authoring and only need the collider with isTrigger ticked and a base URP color component.

Assign player and enemy unit prefabs to the Unit Config Authoring Object

Assign player and enemy projectile prefabs to the WeaponConfigAuthoring Object

Place one gameobject with the player spawn authoring script in the scene, and however many enemy spawn authoring scripts in the scene. Select destroyer or fighter for unit type, the other options were aspirational lol.

That should get you most of the way there. Cheers!

That sounds like a super stressful bug!  Sorry you had to go through that, and thanks for writing up such a detailed description of how to reconstruct the proper config.  Truly above and beyond.