how to use spline that is located in another blueprint?
i need to use spline which is located in another blueprint. How can I do that? I m trying to do that using cast to but cast to doesnt work as i want.
asked Oct 05 '17 at 06:23 AM in Blueprint Scripting
You need to provide more info. Are the objects placed in the level or spawned dynamically? Which blueprint is trying to communicate with one another?
Generally speaking, you need to obtain a reference to your object first, casting is not always necessary.
answered Oct 05 '17 at 07:14 AM
To cast you first need to have the reference of this pawn.
Here is a helpful page: https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/FindingActors/Blueprints/index.html
You can also have something like a seperate "Spline Manager" that you will add references to when spawning those spline-pawns, and then have it expose functions that do whataver you need to do with them, achieving nice Seperation Of Concerns.
answered Oct 05 '17 at 11:50 AM
You might try using a "Get All Actors of Class" in your pawn. You can search for your spline blueprint and find the right one to get your spline variable out of. (It's messy, but if there's only one in the level, just get index 0 out of the result of Get All Actors of Class)
answered Oct 07 '17 at 01:53 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here