# \#actorcomponent

**URL:** https://forums.unrealengine.com/tag/actorcomponent/5981.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [\[Replicating TArray of UObjects\] Cannot get TArray\<UItemObject\*\> to replicate from within custom ActorComponent.](https://forums.unrealengine.com/t/replicating-tarray-of-uobjects-cannot-get-tarray-uitemobject-to-replicate-from-within-custom-actorcomponent/1262941)

<div class="topic-metadata">

**Author:** [@Jacob\_Odell](https://forums.unrealengine.com/u/Jacob_Odell)\
**Replies:** 7\
**Last updated:** [October 20, 2026, 7:07pm UTC](https://forums.unrealengine.com/t/replicating-tarray-of-uobjects-cannot-get-tarray-uitemobject-to-replicate-from-within-custom-actorcomponent/1262941 "2026-10-20T19:07:25Z")

</div>

Hello, I’m having an issue with getting a TArray of custom ItemObjects to replicate after the initial client load (it does when a client loads, but does not replicate after that). I am successfully adding ItemObjects to…

---

## [C++ UPROPERTY actor component variable being set to null](https://forums.unrealengine.com/t/c-uproperty-actor-component-variable-being-set-to-null/413170)

<div class="topic-metadata">

**Author:** [@Acds](https://forums.unrealengine.com/u/Acds)\
**Replies:** 14\
**Last updated:** [April 16, 2025, 1:58am UTC](https://forums.unrealengine.com/t/c-uproperty-actor-component-variable-being-set-to-null/413170 "2025-04-16T01:58:54Z")

</div>

I posted another question here https://answers.unrealengine.com/questions/737973/reference-being-added-to-defaults-container.html which is likely related and sharing the same root cause. In short, I have a custom UActor…

---

## [Custom UActorComponent is null](https://forums.unrealengine.com/t/custom-uactorcomponent-is-null/411822)

<div class="topic-metadata">

**Author:** [@intronaut](https://forums.unrealengine.com/u/intronaut)\
**Replies:** 3\
**Last updated:** [December 31, 2023, 2:26pm UTC](https://forums.unrealengine.com/t/custom-uactorcomponent-is-null/411822 "2023-12-31T14:26:49Z")

</div>

Hi Guys, I’ve encountered a weird problem: I have an ACharacter and I’ve added several UActorComponents to this ACharacter. Now when I try to access one of the Components, it’s null. The weird thing is that not all of…

---

## [AttachToComponent called twice before actually snap to socket](https://forums.unrealengine.com/t/attachtocomponent-called-twice-before-actually-snap-to-socket/499959)

<div class="topic-metadata">

**Author:** [@luchetti88](https://forums.unrealengine.com/u/luchetti88)\
**Replies:** 3\
**Last updated:** [February 19, 2022, 11:38pm UTC](https://forums.unrealengine.com/t/attachtocomponent-called-twice-before-actually-snap-to-socket/499959 "2022-02-19T23:38:09Z")

</div>

Hi all, In my custom ACharacter class I have a simple method as the one below: void AMyCharacter::ActivateInteraction() { if(CurrentInteractableItem) { if(AMyEquip\* Equip = Cast\<AMyEquip\>(CurrentInteractableItem.Ge…

---

## [How to include (add) a Blueprint component to C++ Actor?](https://forums.unrealengine.com/t/how-to-include-add-a-blueprint-component-to-c-actor/492414)

<div class="topic-metadata">

**Author:** [@thenull3](https://forums.unrealengine.com/u/thenull3)\
**Replies:** 9\
**Last updated:** [February 1, 2022, 3:13pm UTC](https://forums.unrealengine.com/t/how-to-include-add-a-blueprint-component-to-c-actor/492414 "2022-02-01T15:13:59Z")

</div>

There is a Blueprint Component “FlatComponent” based on ActorComponent, it needs to be somehow added to the C++ Actor, which is called “FlatActor”. How can I do it? I tried adding this to FlatActor.h: UPROPERTY(Visibl…

---

## [How to create and attach a UActorComponent at runtime](https://forums.unrealengine.com/t/how-to-create-and-attach-a-uactorcomponent-at-runtime/491666)

<div class="topic-metadata">

**Author:** [@Floydx23](https://forums.unrealengine.com/u/Floydx23)\
**Replies:** 2\
**Last updated:** [December 7, 2021, 1:36pm UTC](https://forums.unrealengine.com/t/how-to-create-and-attach-a-uactorcomponent-at-runtime/491666 "2021-12-07T13:36:36Z")

</div>

Hey everyone, I’m trying to create a UActorComponent and attach it to an AActor. I am creating the component outside of the actor I want to attach it to. The commented stuff is just some stuff I tried but also failed. …

---

## [Register ActorComponent Crash on Cooking](https://forums.unrealengine.com/t/register-actorcomponent-crash-on-cooking/480709)

<div class="topic-metadata">

**Author:** [@Cissoid](https://forums.unrealengine.com/u/Cissoid)\
**Replies:** 1\
**Last updated:** [April 2, 2021, 12:45pm UTC](https://forums.unrealengine.com/t/register-actorcomponent-crash-on-cooking/480709 "2021-04-02T12:45:48Z")

</div>

Hello, I wrote an ActorComponent, and added it to my Character Class, in the Editor it works fine, but on Cooking it crashes. Maybe i register the component in a wrong way. I hope you can help me. MyCharacter.h UP…

---

## [How to create WidgetComponent with a UUserWidget reference in C++ code?](https://forums.unrealengine.com/t/how-to-create-widgetcomponent-with-a-uuserwidget-reference-in-c-code/474741)

<div class="topic-metadata">

**Author:** [@GunTheHuman](https://forums.unrealengine.com/u/GunTheHuman)\
**Replies:** 3\
**Last updated:** [November 21, 2020, 5:00am UTC](https://forums.unrealengine.com/t/how-to-create-widgetcomponent-with-a-uuserwidget-reference-in-c-code/474741 "2020-11-21T05:00:21Z")

</div>

I have a simple AUnit actor which resembles a tank. I also have a ActorComponent ‘HealthComponent’ attached through it via code. The HealthComponent takes care of HP and should also spawn the health bar above the tank un…

---

## [How to create a cylinder in c++](https://forums.unrealengine.com/t/how-to-create-a-cylinder-in-c/467194)

<div class="topic-metadata">

**Author:** [@antonio\_gamedev](https://forums.unrealengine.com/u/antonio_gamedev)\
**Replies:** 5\
**Last updated:** [June 24, 2020, 5:52pm UTC](https://forums.unrealengine.com/t/how-to-create-a-cylinder-in-c/467194 "2020-06-24T17:52:32Z")

</div>

Hello, I would like to create a cylinder in c++, I can create boxes component and spheres, are there any cyilinder?

---

## [Inheritance vs Interface/ActorComponent](https://forums.unrealengine.com/t/inheritance-vs-interface-actorcomponent/462534)

<div class="topic-metadata">

**Author:** [@larkinsk84](https://forums.unrealengine.com/u/larkinsk84)\
**Replies:** 2\
**Last updated:** [April 12, 2020, 7:41pm UTC](https://forums.unrealengine.com/t/inheritance-vs-interface-actorcomponent/462534 "2020-04-12T19:41:31Z")

</div>

Hello, newbie here who needs help on a design decision. I’m planning on a game that uses both Characters and Creatures, and currently my approach is inheriting common functionality from a parent Pawn class. I would lik…

---

## [Static vs Dynamic Components (Replication)](https://forums.unrealengine.com/t/static-vs-dynamic-components-replication/453815)

<div class="topic-metadata">

**Author:** [@jr557](https://forums.unrealengine.com/u/jr557)\
**Replies:** 2\
**Last updated:** [August 26, 2019, 9:49pm UTC](https://forums.unrealengine.com/t/static-vs-dynamic-components-replication/453815 "2019-08-26T21:49:24Z")

</div>

I was reading the difference between static components and dynamic components on: I have a variable in my component that needs to be controlled by the server but replicated to clients. I set that variable to be replica…

---

## [Need to obtain class of Actor that my custom ActorComponent that I've used IDetailCustomization to create a custom viewer for](https://forums.unrealengine.com/t/need-to-obtain-class-of-actor-that-my-custom-actorcomponent-that-ive-used-idetailcustomization-to-create-a-custom-viewer-for/452829)

<div class="topic-metadata">

**Author:** [@Schwingggg](https://forums.unrealengine.com/u/Schwingggg)\
**Replies:** 0\
**Last updated:** [July 25, 2019, 4:24pm UTC](https://forums.unrealengine.com/t/need-to-obtain-class-of-actor-that-my-custom-actorcomponent-that-ive-used-idetailcustomization-to-create-a-custom-viewer-for/452829 "2019-07-25T16:24:24Z")

</div>

I wrote a custom detail viewer for an actor component I have. I’m trying to get the class of the actor that it’s attached to while editing the blueprint. I’m able to obtain the pointer to my ActorComponent, but that’s it…

---

## [Blueprint variables reset to default](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452)

<div class="topic-metadata">

**Author:** [@dingtech](https://forums.unrealengine.com/u/dingtech)\
**Replies:** 6\
**Last updated:** [May 2, 2019, 1:38am UTC](https://forums.unrealengine.com/t/blueprint-variables-reset-to-default/398452 "2019-05-02T01:38:52Z")

</div>

There is an issue after importing from 4.16 to 4.17 that causes an Actor’s ActorComponents to reset instance variables to their defaults, when the actor is referencing a variable from the actor component. To reproduce: …

---

## [UActorComponent::Rename() on a SkeletalMesh leads to a engine crash on unregistering the components!](https://forums.unrealengine.com/t/uactorcomponent-rename-on-a-skeletalmesh-leads-to-a-engine-crash-on-unregistering-the-components/444656)

<div class="topic-metadata">

**Author:** [@minecrafter338](https://forums.unrealengine.com/u/minecrafter338)\
**Replies:** 1\
**Last updated:** [March 8, 2019, 12:16am UTC](https://forums.unrealengine.com/t/uactorcomponent-rename-on-a-skeletalmesh-leads-to-a-engine-crash-on-unregistering-the-components/444656 "2019-03-08T00:16:15Z")

</div>

Hello guys, I stumbled across this when using the GameplayAbilityTargetActor\_ActorPlacement with an actor that contains a SkeletalMeshComponent. I need a way to be able to use SkeletalMeshComponents on these actors! Wh…

---

## [Using GetComponentByClass](https://forums.unrealengine.com/t/using-getcomponentbyclass/411844)

<div class="topic-metadata">

**Author:** [@Jakoban](https://forums.unrealengine.com/u/Jakoban)\
**Replies:** 2\
**Last updated:** [February 4, 2019, 7:39am UTC](https://forums.unrealengine.com/t/using-getcomponentbyclass/411844 "2019-02-04T07:39:20Z")

</div>

Whenever I try to use GetComponentByClass I’m hit with some error like type name not allowed or something like that.Can someone just give me a clear example of using GetComponentByClass with UPrimitiveComponent? And what…

---

## [Setting default values for a c++ custom inherited actor component](https://forums.unrealengine.com/t/setting-default-values-for-a-c-custom-inherited-actor-component/436840)

<div class="topic-metadata">

**Author:** [@Xallenia](https://forums.unrealengine.com/u/Xallenia)\
**Replies:** 1\
**Last updated:** [November 2, 2018, 7:49am UTC](https://forums.unrealengine.com/t/setting-default-values-for-a-c-custom-inherited-actor-component/436840 "2018-11-02T07:49:23Z")

</div>

The functionality I’m trying to achieve is similar to that of the Character Movement component in the Character class. If you create a blueprint class that inherits from Character, the resulting class will have an inheri…

---

## [Distinguish modify and delete of ActorComponent](https://forums.unrealengine.com/t/distinguish-modify-and-delete-of-actorcomponent/429601)

<div class="topic-metadata">

**Author:** [@solarisx](https://forums.unrealengine.com/u/solarisx)\
**Replies:** 0\
**Last updated:** [July 17, 2018, 2:01pm UTC](https://forums.unrealengine.com/t/distinguish-modify-and-delete-of-actorcomponent/429601 "2018-07-17T14:01:50Z")

</div>

I develop and editor and game plugin. I track some ActorComponents. If one of them is modified (eg. set to invisible) or deleted it’s OnUnregister() is called. How can I distinguish if it is modified or deleted? void UM…

---

## [I am using a scene capture 2d component of my character for my inventory. It does not seem to run as well when I playtest it as when I view it in the engine editor](https://forums.unrealengine.com/t/i-am-using-a-scene-capture-2d-component-of-my-character-for-my-inventory-it-does-not-seem-to-run-as-well-when-i-playtest-it-as-when-i-view-it-in-the-engine-editor/421331)

<div class="topic-metadata">

**Author:** [@cherking](https://forums.unrealengine.com/u/cherking)\
**Replies:** 0\
**Last updated:** [March 30, 2018, 1:32pm UTC](https://forums.unrealengine.com/t/i-am-using-a-scene-capture-2d-component-of-my-character-for-my-inventory-it-does-not-seem-to-run-as-well-when-i-playtest-it-as-when-i-view-it-in-the-engine-editor/421331 "2018-03-30T13:32:22Z")

</div>

My character has an item attached to a socket and is also animated. When I view the scene capture in the engine editor, everything is smooth and the item is firmly socketed. However, when I actually playtest the scene ca…

---

## [BP: 'Add Component' for Child of Actor Component node reverting from Class to generic 'Add Component' node](https://forums.unrealengine.com/t/bp-add-component-for-child-of-actor-component-node-reverting-from-class-to-generic-add-component-node/407627)

<div class="topic-metadata">

**Author:** [@Skifree](https://forums.unrealengine.com/u/Skifree)\
**Replies:** 1\
**Last updated:** [October 30, 2017, 3:33pm UTC](https://forums.unrealengine.com/t/bp-add-component-for-child-of-actor-component-node-reverting-from-class-to-generic-add-component-node/407627 "2017-10-30T15:33:35Z")

</div>

I have a relatively simple set up of actorComponents called BehaviorNode’ I have about 7children of the ‘behaviorNode’, one of which is ‘projectileFire’. I have children of ‘projectileFire’ called FireOnce, FireLoop, an…

---

## [BlueprintImplementableEvent not working on UActorComponents](https://forums.unrealengine.com/t/blueprintimplementableevent-not-working-on-uactorcomponents/396979)

<div class="topic-metadata">

**Author:** [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Replies:** 7\
**Last updated:** [July 7, 2017, 3:38pm UTC](https://forums.unrealengine.com/t/blueprintimplementableevent-not-working-on-uactorcomponents/396979 "2017-07-07T15:38:24Z")

</div>

I’ve created my custom ActorComponent, and declared a BlueprintImplementableEvent inside it. My goal was to have it overriden in blueprints, but it doesn’t show when I click on “Override” button, on Functions category, …

---

## [Problems with custom Scene Component](https://forums.unrealengine.com/t/problems-with-custom-scene-component/387904)

<div class="topic-metadata">

**Author:** [@kbrizov](https://forums.unrealengine.com/u/kbrizov)\
**Replies:** 0\
**Last updated:** [March 14, 2017, 2:56pm UTC](https://forums.unrealengine.com/t/problems-with-custom-scene-component/387904 "2017-03-14T14:56:48Z")

</div>

Hello guys, I want to create a custom (Scene Component) Camera Rig Component. I want it as a component because I don’t want to have Camera Logic inside my ACharacter class. So I created UCameraRigComponent class that l…

---

## [How to instantiate using New Object?](https://forums.unrealengine.com/t/how-to-instantiate-using-new-object/384070)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_1ed1c3df](https://forums.unrealengine.com/u/anonymous_user_1ed1c3df)\
**Replies:** 1\
**Last updated:** [February 6, 2017, 2:22pm UTC](https://forums.unrealengine.com/t/how-to-instantiate-using-new-object/384070 "2017-02-06T14:22:52Z")

</div>

This subject seems to have gotten a little murky since Construct Object was depreciated. What is the correct way to use New Object to spawn a new instance of a UClass? I’m trying to build a custom factory for dynamicall…

---

## [What is the lifecycle of the controller, character and HUD?](https://forums.unrealengine.com/t/what-is-the-lifecycle-of-the-controller-character-and-hud/383735)

<div class="topic-metadata">

**Author:** [@acxsasx](https://forums.unrealengine.com/u/acxsasx)\
**Replies:** 2\
**Last updated:** [February 3, 2017, 5:12am UTC](https://forums.unrealengine.com/t/what-is-the-lifecycle-of-the-controller-character-and-hud/383735 "2017-02-03T05:12:48Z")

</div>

I found this for the actor: Actor Lifecycle Is there some similar document for the lifecycle that include the creating the HUD and the Actor Components on the ACharacter? The reason I am asking: I have Widgets referr…

---

## [How to properly use PlayerState and ActorComponents](https://forums.unrealengine.com/t/how-to-properly-use-playerstate-and-actorcomponents/379274)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_84f9c1eb](https://forums.unrealengine.com/u/anonymous_user_84f9c1eb)\
**Replies:** 1\
**Last updated:** [December 14, 2016, 4:34pm UTC](https://forums.unrealengine.com/t/how-to-properly-use-playerstate-and-actorcomponents/379274 "2016-12-14T16:34:35Z")

</div>

As a little background of what I’m doing - or at least what I’m trying to do - I’m making an RPG game with individual players having their own stats such as (Strength, Vitality and so on). I’m a little confuse as to whe…

---

## [ActorComponent does not replicate variables to client](https://forums.unrealengine.com/t/actorcomponent-does-not-replicate-variables-to-client/368419)

<div class="topic-metadata">

**Author:** [@GrimlessBBS](https://forums.unrealengine.com/u/GrimlessBBS)\
**Replies:** 5\
**Last updated:** [August 28, 2016, 7:30am UTC](https://forums.unrealengine.com/t/actorcomponent-does-not-replicate-variables-to-client/368419 "2016-08-28T07:30:51Z")

</div>

Adding an ActorComponent subclass to a replicating Actor does not replicate value changes in the ActorComponent’s variables to the owning client. Test case: Create an Actor subclass (called “MyActor”) in blueprints an…

---

## [\[Feature Request\] C++ ActorComponent importing/exporting](https://forums.unrealengine.com/t/feature-request-c-actorcomponent-importing-exporting/354404)

<div class="topic-metadata">

**Author:** [@peicou](https://forums.unrealengine.com/u/peicou)\
**Replies:** 3\
**Last updated:** [April 16, 2016, 9:18pm UTC](https://forums.unrealengine.com/t/feature-request-c-actorcomponent-importing-exporting/354404 "2016-04-16T21:18:19Z")

</div>

Hello, Whenever I implement a new ActorComponent and I want to use it in a different project, I have to create a new one and copy/paste my old code. This works, but can easily lead to problems and it’s a waste of time. …

---

## [CreateDefaultSubobject fails after Hot Reload](https://forums.unrealengine.com/t/createdefaultsubobject-fails-after-hot-reload/322767)

<div class="topic-metadata">

**Author:** [@Dwarfmine](https://forums.unrealengine.com/u/Dwarfmine)\
**Replies:** 1\
**Last updated:** [March 21, 2016, 1:07pm UTC](https://forums.unrealengine.com/t/createdefaultsubobject-fails-after-hot-reload/322767 "2016-03-21T13:07:04Z")

</div>

I having an AActor (C++ class) and a UActorComponent (C++ class). In the constructor of the Actor I create the Component. The Actor is once in the world. After changing something inside of the TickFunction of the Compo…

---

## [Component replication in PlayerController](https://forums.unrealengine.com/t/component-replication-in-playercontroller/345195)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_d78ada22](https://forums.unrealengine.com/u/anonymous_user_d78ada22)\
**Replies:** 1\
**Last updated:** [January 28, 2016, 10:59am UTC](https://forums.unrealengine.com/t/component-replication-in-playercontroller/345195 "2016-01-28T10:59:53Z")

</div>

Taking into account player controller’s feature of replicating variables to owner client only, how can i properly replicate actor component (or child actor mb) like variable? Turning on controller and component replicati…

---

## [Random stream in ActorComponent doesn't give consistent random results](https://forums.unrealengine.com/t/random-stream-in-actorcomponent-doesnt-give-consistent-random-results/326974)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_a1d09d07](https://forums.unrealengine.com/u/anonymous_user_a1d09d07)\
**Replies:** 4\
**Last updated:** [August 3, 2015, 2:00pm UTC](https://forums.unrealengine.com/t/random-stream-in-actorcomponent-doesnt-give-consistent-random-results/326974 "2015-08-03T14:00:27Z")

</div>

I have a master blueprint class derived from Actor, that is placed in the world. This BP Actor is called\*"Path\*. In Path I have added an ActorComponent based BP called RandomTest. In both Path and RandomTest I have a …

---

## [How to add an ActorComponent created in blueprints to an Actor created in c++?](https://forums.unrealengine.com/t/how-to-add-an-actorcomponent-created-in-blueprints-to-an-actor-created-in-c/325256)

<div class="topic-metadata">

**Author:** [@Ghar](https://forums.unrealengine.com/u/Ghar)\
**Replies:** 2\
**Last updated:** [July 15, 2015, 2:50pm UTC](https://forums.unrealengine.com/t/how-to-add-an-actorcomponent-created-in-blueprints-to-an-actor-created-in-c/325256 "2015-07-15T14:50:30Z")

</div>

I have a custom ActorComponent created with blueprints. Now I am creating a new Character in code, but I haven’t been able to find an example on how to add the component to the Character. This is what I have so far: h: …

[Next page](https://forums.unrealengine.com/tag/actorcomponent/5981.md?match_all_tags=true&page=1&tags%5B%5D=actorcomponent)
