Hi
I have Grabber.h has this variable
public:
bool GrabKeyOn = false;
Now I need to get its value in another class file so I included the header file and do it like this but engine crash on the if statement
#include “Grabber.h”
AActor* UTriggerComponent::GetAcceptedActor() const
{
UGrabber GrabberClass;
if (GrabberClass.GrabKeyOn) {
//.....
}
}
Update:
I tried like this
UGrabber GrabberClass;
if (GrabberClass.GrabKeyOn)
But the Engine crash in line UGrabber GrabberClass;
How I should do this ?