# Apex Destructible doesn't work in package

**URL:** <https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226>\
**Category:** World Creation\
**Tags:** APEX, unreal-engine, Destructible, Physics, question, CPP\
**Created:** [December 10, 2018, 1:12pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226 "2018-12-10T13:12:55Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 10, 2018, 1:12pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/1 "2018-12-10T13:12:55Z")

</div>

Hi. I faced with very strange and specific issue.  
I have an c++ actor with destructible component. I loaded destrictible mesh asset using FContructionHelpers, and spawn this actor in c++ UObject. Everything goes fine while i’m in editor on Standalone game. But when i package, event with additional direcdtories to cook my destructible asset, it spawns, but it has no collision, physics as well, and doesn’t work as destructible.  
I thought the problem is in FContructionHelpers. I decided to create Blueprint actor, which is exactly the same. If i spawn it in blueprint, everything is OK. But as soon as i spawn this actor from c++ code, it doesn’t work in packaged game.  
I thought maybe it’s a problem in my project. I’ve decided to create Blueprint empty project. I created there BP actor with destructoible component and it works. But when i create this actor in cpp code, it doesn’t work. Again.  
I event created in my UObject cpp class “Spawn” function, which only takes UClass to spawn (because i can’t spawn my actor from blueprints, cus UObject can’t spawn, and program architecture makes me use UObject). And if i use this “Spawn” function, it works in editor, but it **STILL** doesn’t work in packaged game. But in my cpp code i have no any reference to destructible components, except this UClass pointer. But this is UClass pointer, why it doesn’t work? If i spawn the same actor in Blueprints, it works.  
As i understood, Apex Destruction library works in another way if the program has any references to Destructible in cpp code, not only in Blueprints. But, as i said, i change everything to use only UClass pointer, and it still doesn’t work.  
To clarify, i have to use UObject, derived from cpp UObject. I’m pretty sure it would work if i could spawn my actor from Blueprints as well, without any (even UClass pointer) references to cpp code.  
So, any ideas?

---

<div class="post-metadata">

**Author:** ![HarryHighDef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HarryHighDef](https://forums.unrealengine.com/u/HarryHighDef)\
**Post date:** [December 10, 2018, 1:15pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/2 "2018-12-10T13:15:55Z")

</div>

Can we see the cpp class from your test and the Bp code too please

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 10, 2018, 1:24pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/3 "2018-12-10T13:24:52Z")

</div>

So, i have virtual SpellCast function. I need my specific “SpellMeteor” spawns the actor “BP\_Meteor” So, in SpellCast\_Imeplementation it just calls SpawnMeteor, which is BlueprintNativeEvent i’ve overrided. (A bit horrible, but i just tested why i can’t use destructible in cpp).

 ![261854-снимок1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/f/27f638d0350ddfdf6c76a0fa33137395c1ff52a2.png)

 ![261856-снимок.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/5/085504961729024c27e560619814ee982dd88b9e.png)

 ![261855-снимок2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/9/aa9ece27cb47fe35917381ec2dfd6b6d1bfc82de.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 10, 2018, 4:19pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/4 "2018-12-10T16:19:49Z")

</div>

So, if don’t spawn this actor from cpp and just place this actor in the world it works fine. But if i use this cpp function it doesn’t work. And this actor, what i’ve placed in the world, doesn’t work anymore too. It’s very strange.

---

<div class="post-metadata">

**Author:** ![DentonJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DentonJC](https://forums.unrealengine.com/u/DentonJC)\
**Post date:** [December 10, 2018, 9:27pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/5 "2018-12-10T21:27:04Z")

</div>

Is the packaged game for mobile? Because Apex doesn’t seem to work mobile

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 11, 2018, 9:42am UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/6 "2018-12-11T09:42:09Z")

</div>

Nope, it’s for Windows x64. Seems like any code in cpp, that connected to Apex, crashes all dependencies even in BP. Just like he knows that i use Apex somehow in cpp and builds it in another way

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 11, 2018, 9:45am UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/7 "2018-12-11T09:45:20Z")

</div>

But the only one connection is UClass pointer xd. If i broke this connection BP\_Meteor (placed in world) is going to work fine…

 ![261932-снимок.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/b/9cb8c9c0d2466dffb354f36b92e696764e4da368.png)

---

<div class="post-metadata">

**Author:** ![HarryHighDef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HarryHighDef](https://forums.unrealengine.com/u/HarryHighDef)\
**Post date:** [December 11, 2018, 9:52am UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/8 "2018-12-11T09:52:51Z")

</div>

Have you tried making your destructible class in CPP?

I have a base destructible implementation in CPP for our character.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 11, 2018, 10:05am UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/9 "2018-12-11T10:05:58Z")

</div>

Yep, i have. As i mentioned, i’ve created an empty project with cpp class with destructible component. And it didn’t work in packaged game. I’m sure I’m wrong, but I don’t know where exactly. I’ll give u cpp code in few minutes

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 11, 2018, 10:30am UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/10 "2018-12-11T10:30:52Z")

</div>

So, here I go. In the editor: Left side - CPP class with destructible component, right side - just Destructible Mesh placed in world. Everything is fine.

 ![261933-снимок.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/d/27d6d3ff9fb3a16b45224dda4a19db34d7c277cc.png)

 ![261935-снимок3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/6/da6105b67da2d02ffaa0a7d0f91c34f36094bb06.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 11, 2018, 10:35am UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/11 "2018-12-11T10:35:29Z")

</div>

And in the packaged game: Cpp class even didn’t appear, and destructible mesh doesn’t work. Just like it has no collision

 ![261942-снимок4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/e/31e58d7545ad2a09f903c462b32cf5f3a42eb17c.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 11, 2018, 10:37am UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/12 "2018-12-11T10:37:34Z")

</div>

![261943-снимок5.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/a/bcaf501e1901b4ecef9257d0dcac0d67abd55a21.jpeg)

---

<div class="post-metadata">

**Author:** ![HarryHighDef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HarryHighDef](https://forums.unrealengine.com/u/HarryHighDef)\
**Post date:** [December 11, 2018, 1:10pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/13 "2018-12-11T13:10:06Z")

</div>

Are you including the apex stuff in your packaging?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b4c0596](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b4c0596](https://forums.unrealengine.com/u/anonymous_user_5b4c0596)\
**Post date:** [December 11, 2018, 1:38pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/14 "2018-12-11T13:38:10Z")

</div>

What do you mean? How should I do that?

---

<div class="post-metadata">

**Author:** ![exphrasis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@exphrasis](https://forums.unrealengine.com/u/exphrasis)\
**Post date:** [July 7, 2021, 10:00pm UTC](https://forums.unrealengine.com/t/apex-destructible-doesnt-work-in-package/439226/15 "2021-07-07T22:00:20Z")

</div>

I have this issue as well still.  
It’s not in CPP mind you - but spawning a destructible mesh in BP and adding an impulse works completely fine in engine, but just won’t do the impulse and fracture through a packaged project.
