Getting Started

Follow these steps to start using GameShell UI - Time Resource in your Unity project:

1. Import the Asset

  • Purchase and download the GameShell UI - Time Resource asset from the Unity Asset Store.

  • Open your Unity project.

  • Go to Assets > Import Package > Custom Package.

  • Select the downloaded .unitypackage file and click 'Open'.

  • In the Import dialog, ensure all items are selected and click 'Import'.

2. Create Time Resource Scriptable Objects

  • In the Project window, right-click and select Create > GameShell > UI > TimeResource > GSUITimeResource.

  • Name your new time resource (e.g., "EnergyResource").

  • Select the created Scriptable Object and configure its properties in the Inspector:

  • Set the resourceTimeSeconds (time interval for regeneration)

  • Adjust the max value (maximum resource amount)

  • Set the refillRate (amount regenerated per interval)

3. Set Up Your Scene

  • Create empty GameObjects for each time resource you want to use (e.g., "EnergyManager").

  • Add the appropriate component script to each GameObject (e.g., "EnergyBar" script for energy system).

  • In the Inspector, assign the GSUITimeResource Scriptable Object you created to the corresponding field in the component.

4. Implement UI Elements

  • Create UI elements for displaying resource amounts and timers (e.g., Text components for energy amount and regeneration timer).

  • Assign these UI elements to the corresponding fields in your manager scripts (e.g., EnergyBar script).

5. Write Game Logic

  • Create a new script for your game logic (e.g., "GameManager").

  • Add references to your time resource manager scripts.

  • Implement methods to consume resources, check resource availability, and react to resource changes.

Last updated