Skip to content

nicloay/ecs-damage-bubbles

Repository files navigation

ECS implementation of damage bubbles

bubbles

Installation

Prerequisites:

  • Unity 2022.2
  • URP render pipeline
  1. Install the package in one of the following ways:

    1. Open manifest.json and add the following dependency to your project:

      "com.nicloay.ecsdamagebubbles": "https://github.com/nicloay/ecs-damage-bubbles.git?path=/Assets/EcsDamageBubbles"

    2. Alternatively, install from the Git URL in the Package Manager. Copy the following link:

      https://github.com/nicloay/ecs-damage-bubbles.git?path=/Assets/EcsDamageBubbles

      Then, paste it into the Package Manager's "Add package from git URL" field.

      image

  2. Import the demo sample from the Package Manager window.

    image

  3. Open the SampleScene to access the demo project with all required systems and configurations.

Setup Existing Scene

To set up damage bubbles in your existing scene, follow these steps:

  1. Search for the DamageBubblesConfig prefab in the package and drag and drop it into your Entities scene.
  2. Create entities and add the following components to spawn damage bubbles in your systems:
var entity = EntityManager.CreateEntity()
EntityManager.AddComponent(entity, new DamageRequest
{
   Value = _rnd.NextInt(1, 999999),
   ColorId = colorId
});

About

Instancing multiple damage texts on screen

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages