Yes
-
Right click in the content browser and choose Blueprint, and then Actor.
-
Call it something like Inspectable
-
Edit the blueprint and a cube as a static mesh component, and add a text variable.
( Top left in green, add component and choose cube )
- Compile, save and close.
If you plonk that blueprint in your level it will always look like a cube of course, that’s the default.
Part II:
-
So now right click on the blueprint ( in the content browser ) and choose ‘child blueprint’.
-
This will be an actual item, so you can call it Book, for instance.
-
You can edit it, change the mesh from a cube to you book mesh and type something in the text description
This item will work in your game. You carry on making children from the original blueprint, and all of them will be from the Inspecable class.
This means that when you hit an actor with your line trace, you can do a cast on that actor to see if it’s from the Inspectable class. If it is, you can then access the text, and so on.
Does that make sense? Have a go and see where you get to. If you get stuck, show me some piccies.
I also came across this vid which explains the concept: