Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Apex Destructible doesn't work in package.

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?

Product Version: UE 4.20
more ▼

asked Dec 10 '18 at 01:12 PM in Packaging & Deployment

avatar image

1 1 4

avatar image HarryHighDef Dec 10 '18 at 01:15 PM

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

avatar image Arrivedercio Dec 10 '18 at 01:24 PM

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). alt text alt text

alt text

снимок1.png (38.5 kB)
снимок2.png (65.7 kB)
снимок.png (42.3 kB)
avatar image Arrivedercio Dec 10 '18 at 04:19 PM

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.

avatar image Trandana Dec 10 '18 at 09:27 PM

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

avatar image Arrivedercio Dec 11 '18 at 09:42 AM

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

avatar image Arrivedercio Dec 11 '18 at 09:45 AM

But the only one connection is UClass pointer xd. If i broke this connection BP_Meteor (placed in world) is going to work fine...alt text

снимок.png (45.1 kB)
avatar image HarryHighDef Dec 11 '18 at 09:52 AM

Have you tried making your destructible class in CPP?

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

avatar image Arrivedercio Dec 11 '18 at 10:05 AM

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

avatar image Arrivedercio Dec 11 '18 at 10:30 AM

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. alt text alt text

avatar image Arrivedercio Dec 11 '18 at 10:35 AM

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

avatar image Arrivedercio Dec 11 '18 at 10:37 AM

alt text

avatar image HarryHighDef Dec 11 '18 at 01:10 PM

Are you including the apex stuff in your packaging?

avatar image Arrivedercio Dec 11 '18 at 01:38 PM

What do you mean? How should I do that?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question