x

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"

What to #include to get ADestructibleActor?

Hello, I'm new to posting over here. Hopefully this follows the correct general formatting that it's meant to. I'm just wondering what I need to #include in my header to be able to use the ADestructibleActor object. I've tried #include "DestructibleComponent.h" and #include "Components/DestructibleComponent.h" to no avail. This is after manually re-enabling the ApexDestruction plugin in both places (uproject and program files). I'm stuck, now...

Product Version: UE 4.19
Tags:
more ▼

asked Apr 15 '18 at 02:05 PM in C++ Programming

avatar image

VDR_Reaper
13 1 4 7

avatar image BrUnO XaVIeR Apr 15 '18 at 11:50 PM

The engine API docs are a good place to look for header files. At bottom of this page you can see the path for the class you're searching for, here:

http://api.unrealengine.com/INT/API/Runtime/Engine/PhysicsEngine/ADestructibleActor/index.html

Header: Runtime/Engine/Classes/PhysicsEngine/DestructibleActor.h

So you can just do something like:

 #include "Runtime/Engine/Classes/PhysicsEngine/DestructibleActor.h"


If Builder Tool complains the header can't be found, then you have to reference in your Build.cs file the module that header is a member of, in this case the "Engine" module:

 PublicDependencyModuleNames.AddRange(
     new string[] {
         "Core",
         "Engine",
         "CoreUObject",
     }
 );
avatar image VDR_Reaper Apr 16 '18 at 03:49 AM

I've already done/tried both of those things, neither worked. I have "ApexDestruction" referenced in my build CS, I've already attempted to use that import in the header to no avail and I've also made the required edit to my .uproject. None of that has worked.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Ok, never mind. Essentially, the solution is to delete the .sln file that governs the project, in Visual Studio, and then rebuild it from the .uproject file by right clicking it in file explorer. Then, when referencing the header, you merely have to refer to it as #include "DestructibleActor.h" and all is well.

more ▼

answered Apr 16 '18 at 04:23 AM

avatar image

VDR_Reaper
13 1 4 7

avatar image MonstrousBelly Apr 29 '18 at 08:08 AM

Ahh it worked, you're a lifesaver!

(comments are locked)
10|2000 characters needed characters left
Your answer
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