Quick Setup
Last updated
Last updated
QUICK START: Use the included demo prefab to add all the required components to your scene with one drag and drop asset. Then customise to your liking!
1). Add the “Survival Interactor” script to your main camera.
Survival Interactor is the Raycast script for interacting with 3D objects.
Ray Length: The distance you can interact with objects (Default: 5)
Interact Key: This is the input key to interact with items in the scenes (Default: Mouse 0)
2). Add “Survival Vitals Manager” to your hierarchy from the prefabs folder and you can use the settings as below or customise them to your liking:
Player / Max Health: The amount of health the player will currently have and the maximum.
Player / Max Stamina: The amount of stamina the player will currently have and the maximum.
Stamina Drain: How quickly stamina will fall (Higher is faster)
Stamina Regen: How quality stamina will recover over time (Higher is faster)
Jump Cost: How much stamina it will cost to perform a jump action
Player / Max Hunger: The amount of hunger the player will currently have and the maximum
Hunger Drain: How faster hunger will decrease (Higher is faster
Player / Max Thirst: The amount of thirst the player will currently have and the maximum.
Thirst Drain: How faster hunger will decrease (Higher is faster)
Single Damage: This is the damage that will happen when one of Thirst or Hunger is depleted. (Divided by 100 in script - Keep whole numbers)
Double Damage: This is the damage that will happen when BOTH thirst and hunger is depleted. (Divided by 100 in script - Keep whole numbers)
Death Event: Add events for when you have run out of health
3). Add the canvases from the prefab folder, including:
CrosshairCanvas
SurvivalUICanvas
4). Add “Survival UI Manager” to your hierarchy from the prefabs folder and you can use the settings as below or customise them to your liking.
Add the UI items as seen below to the missing slots from the crosshair and survival canvases
5). Add “Survival Audio Manager” to your hierarchy from the prefabs folder and you can use the settings as below or customise them to your liking.
You can add ScriptableObjects to these audio slots in the array to play more sounds that just the ones provided.d
1). Add a 3D model from the models folder or prefabs. Make sure the are setup as below:
Box Collider
“SurvivalItem” script
Choose an item type for your interactive object
Item Value for the amount damage, healing or restoration of the vitals
Item Sound is the ScriptableObject
Add “SurvivalItem” to any 3D object for it to become interactive