| 258 | /// <returns>The child actor.</returns> |
| 259 | template<typename T> |
| 260 | T* GetOrAddChild() |
| 261 | { |
| 262 | T* result = (T*)GetChild(T::GetStaticClass()); |
| 263 | if (!result) |
| 264 | { |
| 265 | result = New<T>(); |
| 266 | result->SetParent(this, false, false); |
| 267 | } |
| 268 | return result; |
| 269 | } |
| 270 | |
| 271 | /// <summary> |
| 272 | /// Gets the child actors of the given type. |