TextureRenderTarget2D

Hi
As everyone remember there was a static method in Unrealscript in TextureRenderTarget2D that simply create new instance of this class.
Unfortunately I can not find this Method in UE4 in UTextureRenderTarget2D class.
I tried to create new instance of it and initialize it using this code in my Actor constructor class(completely came from my instinct)

	Renderer = PCIP.CreateDefaultSubobject<UTextureRenderTarget2D>(this, "Target");
	Renderer->InitAutoFormat(1024, 1024);

after that I created dynamic material for my mesh and after that I assigned Renderer to My Texture parameter and after all I assigned Renderer to a SceneCapture2dComponent (■■■ usual in UDK)

but when i start the map it Raise an exception In File: Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11UniformBuffer.cpp
In Line 207
this Code

		for (int32 i = 0; i < NumResources; ++i)
		{
			check(InResources[i]);
			NewUniformBuffer->ResourceTable[i] = InResources[i];
		}

InResources[i] is NULL

Any help appreciated
thanks

#4.5 TextureRenderTarget2D Crash

There’s a engine-side crash in the function you are calling, that is new in 4.5

Full details here

#Pull Request

I already submitted a pull request to fix this issue

Github

https://github.com/EpicGames/UnrealEngine/pull/542/files

Thank you It is really helpful.