Hi
I’m trying to create a container object for all material related information like effects, sounds, etc which would then be shared and used across all assets of that material. As the editor is powerful for managing assets, I was planning on using it by creating a C++ class that extends from UObject (lets call it UMaterialType) and create a blueprint of each material I want to simulate.
Example here:
UCLASS()
class UMaterialType : public UObject
{
GENERATED_UCLASS_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Effects)
class UParticleSystem* BreakEffect;
...
Then I would create as many blueprints as needed for defining the effects etc for every material. Then my assets, lets say a wall, would have a reference to a UMaterialType like below:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = BreakableMaterial)
TAssetPtr<UMaterialType> MaterialType;
Now the question is that how UE4 internally manages blueprints and assigned assets. If I assign a brick UMaterialType into my blueprint wall and clone it 100 times in scene, will I end up having 100 instances of UMaterialTypes as well? What would be a proper/better way of tackling this in UE4?
A bonus question. Are the UE4 pointer types (like TAssetPtr, TSubobjectPtr, etc) explained in detail somewhere? The name implies a lot, but the actual details are quite well hidden how those should be used.