On first adding NeoFPS to your project, once the assets have been imported, you should see the NeoFPS hub window appear:
The hub will notify you of any changes to the required settings that must be applied (for more information see NeoFPS Installation). It also provides a quick way of accessing the sample scenes along with helpful links for getting the most from NeoFPS;
The hub pop-up will only be shown automatically this first time. If you want to see it again then it can be found in the toolbar via Tools/NeoFPS/NeoFPS Hub. Alternatively you can check the Show hub on startup checkbox at the bottom of the front page, and it will be shown each time the project is loaded.
Down the left-hand side of the hub is a navigation pane that lets you choose the page to view. The hub is split into the following sections:
- The Front Page contains useful links to aid with learning NeoFPS, getting support and engaging with the NeoFPS community.
- Unity Settings is used to apply the Unity settings that NeoFPS requires.
- Upgrade Notes tracks the installed version of NeoFPS and describes the steps required to upgrade to the latest update (both in scripts and components)
- Quick Start contains a selection of readme sub-pages which aid in getting up and running in NeoFPS, link to the relevant docs, and highlight useful assets and folders.
- Demo Scenes lists the available demo scenes and provides a quick way to find and load them. Once loaded, the Scene Info sub-page displays a readme for the scene with links to relevant docs and scene or project items. You can also find an object in each demo scene called Readme which contains this information.
- Game Settings organises the player facing game options, allowing you to change default / starting values or delete your local settings files. These are the options the player can access through the in-game menus such as volume settings, mouse sensitivity, etc.
- Managers organises the manager settings for the various NeoFPS systems.
- Wizards provides a series of tools for quickly creating and setting up items in NeoFPS. For more information, see NeoFPS Wizards.
- Integations lists the available integrations for NeoFPS and provides links to the asset store and GitHub repositories. For the latest integrations, see the integrations page on the website.
- Standalone Tools lists the non-hub based tools available in NeoFPS such as the motion graph editor, the motion debugger, and the save file inspector.
All NeoFPS assets are contained in the NeoFPS folder. Inside this there are 4 subfolders:
- Constants contains all the Generated Constants used by NeoFPS and its samples.
- Core contains all the code and assets required by NeoFPS.
- Resources contains the managers and settings assets that need to be loaded at runtime.
- Samples contains a number of sample assets and scenes that demonstrate the different features of NeoFPS and provide a reference for implementing your own contents and mechanics. For more information, see Samples.
Using NeoFPS In Your Game
The Scene Setup Quick-Start guide available in the hub details the required scene components and links to the relevant prefabs in the project.
The quickest way to start prototyping in NeoFPS is to use the template scene as a starting point. You can find the template scene at the following location:
You can either duplicate this scene as a starting point, or alternatively, if you already have a scene that you want to add then you can use Unity's multi-scene editing features to open the template scene additively in order to copy the relevant objects across. With your starting scene selected, open the template scene additively by right clicking on the scene asset and selecting the Open Scene Additive option. Both scenes will now be shown in the hierarchy and you can copy objects from the template scene and paste them in your own scene. Once you are done, remember to close the template scene by clicking on its options dropdown in the hierarchy and selecting Remove Scene.
The important objects in the demo scene are:
- SimpleSpawnerAndGameMode is a prefab game setup that handles player spawning and death (explained below). You can also find this prefab atAssets\NeoFPS\Samples\SinglePlayer\Prefabs\SimpleSpawnerAndGameMode.prefab
- GlobalProfile is a post-processing profile. You can use this or create your own.
- SceneSaveInfo is required in any scene that you want to support the NeoFPS save game system. This is not a prefab as its settings are unique to each scene. You will also need to add the scene to the build settings.
- ScenePoolHandler is used by the pooling system to manage pooled objects. This will be created automatically if not found, but including one in your scenes leads to a smoother experience.
- HudAndMenuCanvas contains the ingame menu and player HUD
- HudAndMenuEventSystem contains a Unity UI event system that handles input in the HudAndMenuCanvas object above.
In NeoFPS, the player character is not usually placed directly in a scene. Instead it is spawned at runtime from a spawn point and attached to a player object. This system allows for features such as swapping characters and respawning while persisting player information. The SimpleSpawnerAndGameMode prefab listed above contains the relevant spawner, along with a minimal game mode called FpsSoloGameMinimal. This component references the character object and player object to spawn. For more information, see Game Modes and FPS Characters.
The default demo character can be found at Assets\NeoFPS\Samples\SinglePlayer\Prefabs\NeoFpsSoloPlayerCharacter.prefab. You can also find a spawnerless character called PrototypeSpawnerlessCharacter.prefab at the same location. This can be placed directly in a scene instead of the SimpleSpawnerAndGameMode object, but it is limited in how it can handle player death (it defaults to reloading the scene).
For information on how to set up weapons for your game, see Weapons.
To add interaction to your game such as switches, doors and puzzles, see Interaction.
To add your own characters or customise the sample character, see FPS Characters.
NeoFPS is also designed to be extended to suit your vision. Each of the features is implemented in such a way that it can be replaced or expanded. For more information see Extending NeoFPS.