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"

Get viewport native resource crash in standalone

hi,I want to share unreal screen using Spout-UE4 plugin(https://github.com/AleDel/Spout-UE4), it can send viewport image fast, but can only run in the editor play, in standalone or package will crash.

I found it might be in this code crash

     ID3D11Texture2D* baseTexture = 0;
     baseTexture = (ID3D11Texture2D*)GEngine->GameViewport->Viewport->GetRenderTargetTexture()->GetNativeResource();

How can I work after package?

thanks

Product Version: Not Selected
Tags:
more ▼

asked Mar 06 '17 at 08:30 AM in Packaging & Deployment

avatar image

s25796
1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello s25796,

From looking at the description for this plugin, it mentions that it requires OpenGL. Are you including OpenGL as one of your targeted RHIs when packaging? This can be enabled in Project Settings > Platforms > Windows.

more ▼

answered Mar 06 '17 at 04:54 PM

avatar image s25796 Mar 07 '17 at 02:46 AM

thank you Matthew Clark, I will try opengl related issues,

And sorry,I found that I posted the wrong URL before, I use this https://github.com/AleDel/Spout-UE4, not https://github.com/Allar/UE4ToSpout. I know the author has said that can not run in standalone, but I was wondering if there was any way to improve,please help me again, thank you

avatar image Matthew J Mar 07 '17 at 04:59 PM

If the author mentions that it can't be run in standalone, that must be the case. If you need to figure out how to do this, it would be best to contact the developer as we don't provide direct support for third party plugins.

avatar image s25796 Mar 08 '17 at 10:06 AM

OK i ask the author, but I want to know why this unreal engine code can not work in standalone games.

 /** Global engine pointer. Can be 0 so don't use without checking. */
 extern ENGINE_API class UEngine*            GEngine;
 
 GEngine->GameViewport->Viewport->GetRenderTargetTexture()->GetNativeResource();

Only work in editor play, I opened the new project, only to call this code, is the same result. Thank you

avatar image Matthew J Mar 08 '17 at 03:03 PM

As mentioned by that line, it's part of the ENGINE_API, meaning it is only available in the engine. If the Engine_API was included in the game code, it would make it much larger and cause multiple performance issues.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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