x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to get a Editor Standalone Windows plugin reference

Hey, I'm struggling to get a reference in my game code to a plugin that I created.using the Editor Standalone Window plugin template. The find plugin function seems to correctly return my plugin when I breakpoint it however I need to cast it (I assume?) in order to get access to my plugins functions/data etc but a normal cast gives me the error at the bottom. Seems the Cast may only be for UObjects in which case I'm not sure how I get a reference to my plugin.

 TSharedPtr<IPlugin> aPlugin = IPluginManager::Get().FindPlugin("myplugin");
 Fmyplugin* myPluginvar = Cast<Fmyplugin>(aPlugin.Get());

Severity Code Description Project File Line Suppression State Error C2664 'To TCastImpl ::DoCast(UObject )': cannot convert argument 1 from 'From ' to 'UObject ' TestProject C:\Program Files\Epic Games\UE_4.21\Engine\Source\Runtime\CoreUObject\Public\Templates\Casts.h 193

Product Version: UE 4.21
Tags:
more ▼

asked Jan 05 '19 at 11:17 AM in C++ Programming

avatar image

SweeneyPro
8 3 1 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Solution is:

FMyModule myModuleVariable = FModuleManager::Get().GetModulePtr("MyModule");

more ▼

answered Jan 17 '19 at 12:35 PM

avatar image

SweeneyPro
8 3 1 4

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question