![]() If you want to see how Child Actor Components work in C++ take a look at our Tanks vs.Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_0"įunctionReference=(MemberName="GetAllChildActors",bSelfContext=True) You can get a reference from the Get Child Actor function, then cast to the appropriate class! While Child Actor Templates give great access to exposed variables, you may need to update the Child Actor in some way at runtime. If local transform is irrelevant, just use an Actor Component. If that data or behavior requires local transform relative to the owning actor, use Scene Component. If you only need data or specific behavior without additional parts, then you should use BP Components. If you need something that is a fully realized accessory (Mesh, FX, behavior, etc.) then you should be using CACs. Why would you use CACs instead of BP Components? Just as Actors cannot contain other Actors, Components cannot contain Components This means that BP Components cannot also contain Static Mesh Components, etc. You cannot convert a Child Actor Component instance into its own Blueprint.ġ0 Bonus: Child Actor Component vs. Maybe someday… Can’t modify the Components of the Child Actor Class But you can build editability into the Child Actor’s Construction Script and drive through variables. You will be editing the default values for the class. This means that you can only make changes within the parent Actor’s Blueprint Editor. If any of those variables drive parts of the Construction Script, the CAC will update in real time.ĩ Caveats At this time, you do not have per-instance controls. This provides access to any Editable variables that have been set up on the Child Actor. As of UE4.14, when you add a Child Actor Component, you now get a Child Actor Template in the Details Panel. This can be very tedious.Ĭhild Actor Templates bring us one step closer to having Blueprint-within-Blueprint interaction. If your Child Actor is anything more than a self-contained black box, then you need to treat it like a completely separate Blueprint and use BP communication to make changes. Traditionally there was no path to update the variables of a Child Actor. If you like the tradeoff of more project assets in return for more focused functionality on individual parts, CACs might be for you.Ħ Editing CACs One of the major limitations of Child Actor Components is that, historically, they are very difficult to edit or control within Blueprint. Take one pre-built thing, bolt it onto another! If the part (or Component) you’re building needs its own Components. Can be used to distribute workload across multiple artists/devs. :)ĥ Why Would You Use Child Actor Components?Ĭan be a good way to “compartmentalize” construction of a Blueprint. How many is too many? It depends… Remember: smart developers use all things in moderation. General rule: you generally want to avoid using too many Components on a single Blueprint. You can use the CAC as a transform to move the Child Actor around. If spawned, CACs spawn immediately after the parent Actors If placed, Unreal keeps the reference so we don’t have to spawn at Begin Play The CAC itself is an attachment point. Instead, CACs create a spawned version in the Constructor (like the Construction Script). Usually another Blueprint Pro Tip: dragging a Blueprint into the Components panel of an existing Blueprint will automatically create a properly set up CAC!Ĥ CACs: Under the Hood Child Actor Components do not actually change an Actor into a Component! Remember previous limitation: Actors cannot contain other Actors. Set the Child Actor Class property to your desired class. Child Actor Components help us work around that limitation by making one Blueprint a Child Actor of another.ģ How to Use CACs Add a Child Actor Component to your Blueprint. That’s what Components are for! This limitation also extends to Blueprint. One limitation of the Unreal Engine Framework is that one Actor cannot fully contain another Actor. Or: How I Learned to Stop Worrying and Love Child Actor Components Presentation on theme: "Child Actor Component Templates"- Presentation transcript:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |