# getAllActorsOfClass returns empty after packaging project

**URL:** <https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304>\
**Category:** Cinematics & Media\
**Tags:** get-all-actors-from-, unreal-engine, packaging-projects, Blueprint, question\
**Created:** [October 22, 2020, 10:59am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304 "2020-10-22T10:59:21Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 22, 2020, 10:59am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/1 "2020-10-22T10:59:21Z")

</div>

Hi there!

I’m having some trouble dealing with getAllActorsOfClass after packaging my project. I’ve been setting camera system based on this [tutorial][1] (it has 4 parts, i followed all of them), and if in PlayInEditor everything works just fine, after packaging project and executing .exe, i has this in log:

LogScript: Warning: Script Msg: Attempted to access index 0 from array ‘CallFunc\_GetAllActorsOfClass\_OutActors’ of length 0 in ‘/Game/2DSideScrollerBP/Blueprints/2DSideScrollerCharacter.2DSideScrollerCharacter\_C:ExecuteUbergraph\_2DSideScrollerCharacter’!

How can i fix it and why does it even behave like that? All i need is to have reference on my custom camera actor inside my character as a variable. GetAllActorsOfClass node is in Set Camera Reference function belonging to character.

Tnx

 ![319640-camera-character.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/a/1da392203be835f1777163365c605dad9e5aecc0.png)

 ![319651-set-camera-reference-character.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/8/1388d97e0594f922cbaca19b210c5b98161f262c.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 22, 2020, 11:05am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/2 "2020-10-22T11:05:43Z")

</div>

A few things:

1. You can use GetActorOfClass - then you don’t need the get

2. No need to cast, it’s already the correct type. That’s why you get the blue note.

3. It sounds like the camera isn’t getting packaged. Have you tried looking at the BP in the reference viewer, is anything relying on it?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 22, 2020, 11:49am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/3 "2020-10-22T11:49:32Z")

</div>

Hi! thanks for answering.

1-2) i am using cast node just because it provides the way to see if cast failed

1. do you mean this? i haven’t had any deal with reference viwer before. does it seem fine?

 ![319663-reference-viewer.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/6/fa6f7e48570ebb59b0a406755478724d8c605725.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 22, 2020, 11:53am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/4 "2020-10-22T11:53:03Z")

</div>

It look ok. As long as you are packaging NewWorld or the player, the camera should go also.

Are you packaging for development? Does the cast give an error?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 22, 2020, 12:05pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/5 "2020-10-22T12:05:32Z")

</div>

yes, it is for development.

the cast gives an error and i can see that since on the screen i have “failed to cast…” from the print string node

 ![319656-print.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/8/9/d89dba8540bf7883321f1b19e13ad6bdd51eeb87.png)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 22, 2020, 12:28pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/6 "2020-10-22T12:28:52Z")

</div>

Ok, assuming it is just a weird packaging problem and not a BP thing, just try putting a copy of the camera somewhere in the map. You don’t use it, it just gets included in the map, which should force the packaging…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 22, 2020, 12:43pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/7 "2020-10-22T12:43:37Z")

</div>

so i put the second bp\_camera, and after playInEditor it caused red warnings (cause as a copy of bp\_camera it has beginplay event and eventtick nodes too, i think). i packaged it, but still in .exe does not work as it should

also one of my friends has this project on his laptop and he has after packaging the same problem.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 22, 2020, 1:01pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/8 "2020-10-22T13:01:43Z")

</div>

Tick and begin play shouldn’t matter. I can’t tell from here, I’m afraid…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 22, 2020, 1:09pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/9 "2020-10-22T13:09:40Z")

</div>

but thank you for trying! have a good nice day/night c:

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 22, 2020, 1:48pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/10 "2020-10-22T13:48:42Z")

</div>

No worries. If you can make a minimal zip file of it, I’ll take a look…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 22, 2020, 6:01pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/11 "2020-10-22T18:01:42Z")

</div>

it would be wonderful, how can i send it to you?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 22, 2020, 7:06pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/12 "2020-10-22T19:06:13Z")

</div>

First figure out how big the project is, right click on the folder in the explorer and click properties.

Bear in mind you have to upload this somewhere like google docs or dropbox.

If you need to make the project smaller, then make a new project of the same kind and migrate ( right click in content browser ) only the necessary assets to the new project.

Then to zip it up use:

 ![319721-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/5/d65a8fc391c173e2b235174d4c40f6e25ff97774.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 22, 2020, 7:26pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/13 "2020-10-22T19:26:59Z")

</div>

thank you, now you can download it here [https://drive.google.com/file/d/1gO8Z5jlOULWWV6JimVRShWQGrSYDzyb8/view?usp=sharing](https://drive.google.com/file/d/1gO8Z5jlOULWWV6JimVRShWQGrSYDzyb8/view?usp=sharing)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 22, 2020, 9:30pm UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/14 "2020-10-22T21:30:57Z")

</div>

Well, it’s not making it to the PAK file, that’s all I have so far…

EDIT: No interesting info I’m afraid. I think maybe it’s not putting it in the pak because there’s something up with the blueprint.

I tried making a copy and using ‘replace references’ and it crashes the engine. Which also makes me wonder.

I think your best bet is to make a new actor, and copy the code from BP\_CameraGame into it. Set things to use the new one and remove the old one…

Have you been having problems with crashes, or using ‘force delete’ a lot by any chance?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 23, 2020, 5:45am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/15 "2020-10-23T05:45:28Z")

</div>

well, no, i haven’t been having any problems with crashes and, as far as i remember, I didn’t ‘force delete’. I will do as you advise then, otherwise I will get rid of the interface or return to the old camera systen. Thx for your help!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c74e9f701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c74e9f701](https://forums.unrealengine.com/u/anonymous_user_c74e9f701)\
**Post date:** [October 24, 2020, 6:27am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/16 "2020-10-24T06:27:42Z")

</div>

so i mad a new actor with the same bp code from into it and set things to use the new one, deleted the old one, now it works fine, but still, i has no idea why it wasn’t working previously.  
thanks to ClockworkOcean!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 24, 2020, 10:26am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/17 "2020-10-24T10:26:17Z")

</div>

Yes, strange eh? But, like I say, I couldn’t do various things with that old actor ( like replace refs ), which made me suspect something was up 🙂

---

<div class="post-metadata">

**Author:** ![Vexar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vexar/32/1209009_2.png) [@Vexar](https://forums.unrealengine.com/u/Vexar)\
**Post date:** [December 24, 2025, 5:25am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/18 "2025-12-24T05:25:54Z")

</div>

I know this is an old thread but I found that if I copy a get all actors from other places and then try to reuse them for another actor unless I disconnect the entire thing and then compile it sometimes holds on to the previous actor and will not function and I will get consistent warnings about finding NONE when searching. If I recreate it and or what I describe above “CLEAN” it then it works fine.

Did you ever find that Clockwork?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [December 24, 2025, 8:40am UTC](https://forums.unrealengine.com/t/getallactorsofclass-returns-empty-after-packaging-project/473304/19 "2025-12-24T08:40:39Z")

</div>

I’ve never found that, but I have noticed that once an un-typed node gets its type ( like array operations ), they usually need replacing before you can use another variable sort. I’m assuming somehow this behavior makes it through to things like getallactors also.
