What exactly are data-only blueprints?

Hello, I would like to know what exactly data-only blueprints are. From my point of understanding, blueprints are C++ classes under the hood. However, are data-only blueprints their own classes as well or are they serialized instances of a bueprint class that has different values than the default parent blueprint class?

To give some context to my question, working with the UE4 I struggle a lot with the generalization of classes, because I do not see a (convenient) way to create instances of a class for the project outside of runtime, known as serialization, similar to what Unity allows with Prefabs and ScriptableObjects. Additionally, Unity serializes classes as inline-object for actors, whereas in the UE4 you only get a reference which confuses me a lot, because there is no way outside of using EditorUtils to spawn instances of said classes, which makes me wonder if you are supposed to even do that.

A simple example could be a condition class. You would have one general base class Condition and you could create new child classes from that with their own logic. However, if one actually wanted to use said conditions in other classes, how do you connect condition class with the data that the condition class requires? As the condition class won’t be serialized as an inline-object, you would either have to spawn an object at runtime, which opens the question where it gets its parameters from, as you would have to copy the required variables from the condition into the spawning object(factory or whatever), ending up with twice the variable count? Or you would want an instance that you create in the editor and there you fill the data in, simply referencing this instance at runtime. This is what I think data-only blueprints are and I would be greateful if someone could answer and help me with this issue.

Data only BPs just hold variables and no code.

Thank you for your reply. Yes, on the outside they only hold variables,but what does it mean for the inside? Are they only serialized instances of their ‘parent class’ or are they their own classes?

When it comes to blueprint instances, there is an interesting tooltip text when creating Object Libraries, for the field ‘Object Base Class’. There it says something along the lines of ‘(…) native class that the blueprints are instances of (…)’. What does this refer to? Instances like data-only blueprints, under the assumption that this is what data-only blueprints are, or instances as in spawned objects during runtime.

Yup, sorry, no idea :slight_smile: You’ll have to wait for a C++ enthusiast to happen by…

Class that only override defaults of base class without any code extension, effectively becoming data containing class. They are classes so they are not object and under a hood they technically base class with different default, in asset they should just contain modified defaults.

Equivalent of C++ would class with only constructor setting defaults, in memory varbales declared in C++ will be stored in CDO while blueprint in some UProperty instated place in memory (not exactly sure how it works for blueprint, maybe CDO it self is extended to new properties from blueprint)

Thank you very much for your respone, I think that answers my question.