# UMG, overriding of UsingWidget.Tick

**URL:** <https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566>\
**Category:** UI\
**Tags:** tick, unreal-engine, Scripting, Widget, question, UMG\
**Created:** [October 8, 2014, 3:38am UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566 "2014-10-08T03:38:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![es](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@es](https://forums.unrealengine.com/u/es)\
**Post date:** [October 8, 2014, 3:38am UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566/1 "2014-10-08T03:38:16Z")

</div>

Hello!

UserWidget.Tick is not virtual, could I somehow override Tick in my derived class?

Dima.

---

<div class="post-metadata">

**Author:** ![AustinK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/austink/32/1088212_2.png) [@AustinK](https://forums.unrealengine.com/u/AustinK)\
**Post date:** [January 23, 2015, 6:19am UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566/2 "2015-01-23T06:19:19Z")

</div>

I think it’s wierd that the staff hasn’t commented on this yet. I’m noticing that in the head file it even says

```
/**
	 * Ticks this widget. Override in derived classes, but always call the parent implementation.
	 *
	 * @param MyGeometry The space allotted for this widget
	 * @param InDeltaTime Real time passed since last tick
	 */

```

There is no way to actually override it…

---

<div class="post-metadata">

**Author:** ![DarthB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarthB](https://forums.unrealengine.com/u/DarthB)\
**Post date:** [March 15, 2015, 5:10pm UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566/3 "2015-03-15T17:10:50Z")

</div>

See my answer to another posting:

> **[UserWidget never Ticks](https://forums.unrealengine.com/questions/186343/userwidget-never-ticks.html)**
>
> I defined a tick function in my custom widget as so: UCLASS() class THEARENA\_API UArenaFriendsList : public UUserWidget { GENERATED\_BODY() public: void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float...

---

<div class="post-metadata">

**Author:** ![Elringus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/elringus/32/1017568_2.png) [@Elringus](https://forums.unrealengine.com/u/Elringus)\
**Post date:** [May 13, 2015, 1:18pm UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566/4 "2015-05-13T13:18:37Z")

</div>

But in 4.8 its now throwing a warning C4996: ‘UUserWidget::Tick\_Implementation’: Use NativeTick Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.  
But the NativeTick is still not virtual! I have no idea what they are doing…

---

<div class="post-metadata">

**Author:** ![Sveitar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sveitar/32/710746_2.png) [@Sveitar](https://forums.unrealengine.com/u/Sveitar)\
**Post date:** [July 21, 2015, 5:55pm UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566/5 "2015-07-21T17:55:45Z")

</div>

.h

```
virtual void NativeTick(const FGeometry& MyGeometry, float DeltaTime) override;

```

.cpp

```
void UMainMenuWidget::NativeTick(const FGeometry& MyGeometry, float DeltaTime)
{
	Super::NativeTick(MyGeometry, DeltaTime);

        // Your code goes here
}
```

---

<div class="post-metadata">

**Author:** ![0xAFBF](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@0xAFBF](https://forums.unrealengine.com/u/0xAFBF)\
**Post date:** [September 13, 2017, 3:48pm UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566/6 "2017-09-13T15:48:38Z")

</div>

It may be better to leave the c++ code above the `Super::NativeTick` call, because it calls the blueprint `Tick`, and if it relies on things set by c++ the variables may not be up to date.

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [February 9, 2019, 10:07am UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566/7 "2019-02-09T10:07:35Z")

</div>

I find it best practice to _always_ call `Super::NativeTick` (or any overrided virtual method, for that matter).  
If you need something done in C++ before the blueprint, simply place the code before the call. You could also have `bool bReady` in your class definition, and then:

```
void UMyWidget::NativeTick(const FGeometry& MyGeometry, float DeltaTime) {
    Super::NativeTick(MyGeometry, DeltaTime);
    if(!bReady)
        return;
    // Do whatever
}
```

---

<div class="post-metadata">

**Author:** ![KKochiss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KKochiss](https://forums.unrealengine.com/u/KKochiss)\
**Post date:** [August 18, 2021, 12:23am UTC](https://forums.unrealengine.com/t/umg-overriding-of-usingwidget-tick/295566/8 "2021-08-18T00:23:19Z")

</div>

I wasn’t able to override the NativeTick as described above in 4.26. It just says  
“void UUserWidget::NativeTick(const FGeometry &,float)’: no override available for virtual member function from base class virtual member function’”  
And  
‘UUserWidget’;"‘UCollectionDetailPanel::NativeTick’: method with override specifier ‘override’ did not override any base class methods"
