What is the PCIP?
Hello, I am new to UE4 but currently following the official programming tutorial. I made it to part 18...but I finally need to ask what exactly is this PCIP? It seems to be some kind of factory...but I cant find it in the Object library.
Another thing...why does my IntelliSense take 5 seconds I until I get info on UE4 stuff? :(
asked Jul 09 '14 at 05:32 PM in C++ Programming
PCIP is the name of a variable. It is a pointer to an object of type FPostConstructInitializeProperties. From what I gather, it is a required parameter in any object that subclasses UObject. My guess is that the engine assumes that for any UObject that it wants to create, it will contain a constructor definition that accepts an FPostConstructInitializeProperties as a parameter. Since all objects essentially derive from UObject, you will see PCIP everywhere. Within your constructor, you can access the functions of PCIP with the dot notation to do some post-initialization stuff.
I'm guessing that this is what helps to provide all the introspection/polymorphic goodness in the engine.
If you look at an example of usage:
you can see that it is const. You can also see that prior to executing the constructor code, Super is initialized with the same PCIP. I don't think you will ever need to create a PCIP to pass to your object. This is something that should be handled by the engine and passed to your constructor when your object is created. You just need to make sure your object's constructor can pass it along to the next level up.
Just a small addition to this old post. Most of you will probably have noticed already, but if your c++ class contains two constructor, one with PCIP, one without, the engine will only use the one with PCIP when instancing this object.
The engine will only display "initialized WITH PCIP", so the first constructor is ignored by default
answered Mar 30 '16 at 03:46 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here