# Custom trigger volumes in current level loses brush volume when class is modified and hot reloaded

**URL:** <https://forums.unrealengine.com/t/custom-trigger-volumes-in-current-level-loses-brush-volume-when-class-is-modified-and-hot-reloaded/377166>\
**Category:** C++\
**Tags:** unreal-engine, Volumes, bug-report, CPP, question\
**Created:** [November 22, 2016, 11:32pm UTC](https://forums.unrealengine.com/t/custom-trigger-volumes-in-current-level-loses-brush-volume-when-class-is-modified-and-hot-reloaded/377166 "2016-11-22T23:32:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_6ee34f84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6ee34f84](https://forums.unrealengine.com/u/anonymous_user_6ee34f84)\
**Post date:** [November 22, 2016, 11:32pm UTC](https://forums.unrealengine.com/t/custom-trigger-volumes-in-current-level-loses-brush-volume-when-class-is-modified-and-hot-reloaded/377166/1 "2016-11-22T23:32:25Z")

</div>

I have a custom trigger volume that inherits from ATriggerVolume. However, any time a modification is made to my custom trigger volume in C++ and I compile/hot reload, the all of the custom volume’s brushes completely disappear (and thus no longer detects any overlaps). For now, I switch to a level without the custom volume and compile/hot reload there, as it only seems to affect volumes in the current level. I tested this by making trivial changes like adding a new UPROPERTY to the class.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [November 25, 2016, 5:32pm UTC](https://forums.unrealengine.com/t/custom-trigger-volumes-in-current-level-loses-brush-volume-when-class-is-modified-and-hot-reloaded/377166/2 "2016-11-25T17:32:22Z")

</div>

hey sdf000-

How is your trigger volume setup in code? Can you provide the class files (.h and .cpp) to help me recreate the issue you’re seeing on my end?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6ee34f84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6ee34f84](https://forums.unrealengine.com/u/anonymous_user_6ee34f84)\
**Post date:** [November 28, 2016, 2:12am UTC](https://forums.unrealengine.com/t/custom-trigger-volumes-in-current-level-loses-brush-volume-when-class-is-modified-and-hot-reloaded/377166/3 "2016-11-28T02:12:17Z")

</div>

TransitionalTriggerVolume.h

```
#pragma once
#include "Engine/TriggerVolume.h"
#include "TransitionTriggerVolume.generated.h"

UCLASS()
class DUNGEONWIZARD_API ATransitionTriggerVolume : public ATriggerVolume
{
	GENERATED_BODY()
	
public:
	/* Trigger type. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Transition)
	FString Trigger;

	/* Extra value modifier. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Transition)
	FString Value;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Transition, meta = (DisplayName = "Enabled"))
	bool IsEnabled = true;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Transition, meta = (DisplayName = "Test Bool"))
	bool TestBool = false;

protected:
	UFUNCTION()
	void NotifyActorBeginOverlap(AActor* OtherActor) override;
	
};

```

TransitionalTriggerVolume.cpp

```
#pragma once
#include "MyGame.h"
#include "TransitionTriggerVolume.h"

void ATransitionTriggerVolume::NotifyActorBeginOverlap(AActor* OtherActor)
{
	UE_LOG(LogTemp, Log, TEXT("touched ttv %s: %s, %s"), *OtherActor->GetClass()->GetName(), *Trigger, *Value);
}

```

If it works for you fine (brushes don’t disappear), I’ll try upgrading the engine. Thanks for looking into this.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [November 28, 2016, 3:55pm UTC](https://forums.unrealengine.com/t/custom-trigger-volumes-in-current-level-loses-brush-volume-when-class-is-modified-and-hot-reloaded/377166/4 "2016-11-28T15:55:58Z")

</div>

Thank you for the sample code. I have reproduced this issue and logged a report for it here [Unreal Engine Issues and Bug Tracker (UE-39066)](https://issues.unrealengine.com/issue/UE-39066) . You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers
