My EdMode plugin is hitting an exception when calling the constructor.

I’m trying to create an editor mode. Right now, all I want is to bind a keyboard shortcut (Ctrl+G) to a function. The problem is, my EdMode constructor is hitting an exception when I switch to the mode. It seems like it has something to do with the UICommandList since the exception has something to do with pointers.

My EdMode CPP file

My EdMode Header File

My Commands CPP File

My Commands Header file

The exception occurs in the BindCommands() function. I think it has to do with the UICommand list but i’m following the code from an existing plugin. The exception thrown is at SharedPointer.h at line 838. The block is this

FORCEINLINE typename FMakeReferenceTo<ObjectType>::Type operator*() const
	{
		check( IsValid() );
		return *Object;
	}

What’s causing this? What’s the solution or the right way to bind a keyboard shortcut in an editor mode?>

1 Like