Prerequisites:
- Unity 2022.2
- URP render pipeline
-
Install the package in one of the following ways:
-
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"
-
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.
-
-
Import the demo sample from the Package Manager window.
-
Open the SampleScene to access the demo project with all required systems and configurations.
To set up damage bubbles in your existing scene, follow these steps:
- Search for the
DamageBubblesConfig
prefab in the package and drag and drop it into your Entities scene. - 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
});