Unity RTS Engine

  1. Home
  2. Unity RTS Engine
  3. Effect Objects

Effect Objects

The Effect Obj Pool component serves as pool for effect and attack objects in the map.

When you’re creating a new map using the RTS Engine menu editor, this component is attached to an object called “AttackManager”.

While the Effect Obj Pool component doesn’t have any fields that you can assign, creating an effect object requires attaching the Effect Obj component which has the following fields:

  1. Code: Make sure that every effect object has a unique code so that the effect object pool can distinguish between different effect objects.
  2. Enable Life Time: When enabled, the effect object will have a life time during which it will be shown when activated. When disabled, the effect object will have to be manually hidden.
  3. Default Life Time: When life time is enabled, this is the default life time (in seconds) of the effect object.
  4. Disable Time: Time (in seconds) to keep displaying the effect object after it’s marked as disabled. During this time, the effect object won’t be able to be fetched to be re-used again by the effect object pool. This can be useful to allow time for a particle system that’s attached to the effect object to stop and not just disappear instantly.
  5. Spawn Position Offset: Offset the spawn position by this vector.
  6. On Enable Event: Methods from other components to call when the effect object is enabled.
  7. On Disable Event: Methods from other components to call when the effect object is disabled.

How can we help?