Why is it impossible to extend from scenecapturecomponent?

Hi,

As with UE4 4.7, the same problem remains with UE4 4.8: it is impossible to extend from scenecapturecomponent.

Extending from it with a new Blueprint class is not a choice when you create one.

Extending from it with a new C++ Class seems possible, as you can create one, then you can start compiling but compile always fails. And if you try to compile again in Visual Studio, you get the same errors and compiles fails too.

When i say that compiles fails, i mean that even if you add absolutely no code and compile, it fails.
So i’d like to know what the problem is and if it is intended to be fixed.

I know that i can write directly in this class and build entirely the editor from source code but on my computer, building UE4 takes 90 minutes. So it would be SO appreciated if it was fixed.

Just found this post where from Epic Staff answers about this problem:

“It appears that the SceneCaptureComponent2D is not an “exported” class from the Engine, and is not intended to be extended. You can certainly modify the source code yourself to allow this class to be extended, but it does not look like we will be making this change to the source code ourselves.”

Don’t understand why it’s forbidden to extend from a class you can however modify.

Hi,

I wanted to try to clarify the response I provided on the other post. The SceneCaptureComponent2D class was not intended to be extended by creating subclasses of it. That was not something we had intended when the class was originally created, and we are not likely to modify the source code ourselves to allow this class to be extended in future versions of the Engine.

However, if you are working with an Engine that you have built from source code, you are able to modify the source code any way you would like (as long as you do not violate the EULA). If you would like to alter the source code for this class to allow it to be extended in your version of the Engine, then you are free to do so.

Hi ,

Yes, that’s how I understood it.
When I said “forbidden”, I probably should have said something else. I wasn’t speaking about legal things but technical ones.

I mean that it seems strange to make it impossible to extend from this class, due to coding choices, whereas you can however modify this limitation by adding code or changing api category (from minimal to engine, i think).

So, more clearly, my question was: why do you put this limitation that can be easily removed? Why not removing it from the start by yourself?

Sorry, I lost track of this post.

I ran this question past one of our engine developers, and it looks like we will be re-evaluating the possibility of exporting the SceneCaptureComponent2D class to allow it to be extended. When the question was raised in the previous post, the class was still in a bit of flux. The main concern at the time was being able to support backwards compatibility of any classes that extended from it. Now that the class structure has been pretty much set, it is more likely that we will export it by default.

Ok, thanks for these informations.
So wait and see.

Cheers.

Ed

“Now that the class structure has been pretty much set, it is more likely that we will export it by default”
Almost one year later, any news about this?
Will scenecapturecomponent2D class will finally be extendable in future versions of the engine (4.12, 4.13?)?
This would be very cool for me to release a much more user friendly version of shaders i’m working on. At the moment, they require rebuilding the engine. With this extendability, I could just use child classes of scenecapturecomponent2D within my project.

Hi,

I have been checking on this internally, and unfortunately it has not yet been exported. However, I was able to determine that we plan to do so very soon. We are currently tracking this in ticket UE-6468, and I will try to keep an eye on it so I can provide you with an update when it has been resolved.

Hey ,

will the future change include the ability to override the rendering path? I’ve done the change myself locally (including the ability to override the rendering path) so I’m really interested in what Epic is planning to do with the class.

  • Xaymar

Hi ,
Great news !
Thanks a lot for the feedback

Hi Xaymar,

I am not aware of any plans currently to allow overriding the rendering path. If you already have this capability working in your Engine, you may want to consider submitting a pull request on GitHub. That would allow us to evaluate your change and potentially bring it into the Engine.

Hi ,
I just checked out 4.13 source code and scenecapturecomponent class is still part of the minimal api. So no way to extend from it.
Any news about this?

Hi,

I checked the status of the ticket for updating this class, and it is unfortunately still open (you can see the status of this ticket here). I believe other issues have been getting priority over this one. I’m afraid I don’t have any specific news regarding this issue.

ok, anyway thanks for the direct link and the very fast reply!
Ed

Hi ,

Checking UE4 4.14 preview 1 source code, I can see in SceneCaptureComponent.h:

UCLASS(hidecategories=(abstract, Collision, Object, Physics, SceneComponent, Mobility))
class ENGINE_API USceneCaptureComponent : public USceneComponent

Does it mean we’ll finally be able to extend from scenecomponent in 4.14?

Ed

Hi Ed,

I just checked this in 4.14, and I was able to successfully build the project after adding a new code class derived from SceneCaptureComponent2D. It looks like this was changed a few weeks ago, but separately from the ticket that I had entered so that was never updated.

VERY good news.
Thanks, !
Ed