| 145 | #endif |
| 146 | |
| 147 | ParticleEffect* ParticleSystem::Spawn(Actor* parent, const Transform& transform, bool autoDestroy) |
| 148 | { |
| 149 | PROFILE_MEM(Particles); |
| 150 | CHECK_RETURN(!WaitForLoaded(), nullptr); |
| 151 | |
| 152 | auto effect = New<ParticleEffect>(); |
| 153 | effect->SetTransform(transform); |
| 154 | effect->ParticleSystem = this; |
| 155 | #if !BUILD_RELEASE |
| 156 | effect->SetName(_debugName); // Give usable name in development builds |
| 157 | #endif |
| 158 | |
| 159 | Level::SpawnActor(effect, parent); |
| 160 | |
| 161 | if (autoDestroy) |
| 162 | effect->DeleteObject(GetDuration(), true); |
| 163 | |
| 164 | return effect; |
| 165 | } |
| 166 | |
| 167 | void ParticleSystem::InitAsVirtual() |
| 168 | { |
nothing calls this directly
no test coverage detected