Unreal Engine 4.6 Released!

with FSlateApplication::OnControllerButtonPressed(FKey, int32, bool) changed to FSlateApplication::OnControllerButtonPressed(EControllerButtons::Type, int32, bool) in 4.6, what is the correct way to implement input mapping for custom keys in 4.6?

Hi Kory,

I’m wondering if perhaps Epic’s explanation is incomplete, which is leading to a misunderstanding. Epic can’t really control the visibility that we provide for our own subobjects, so I interpreted their explanation as, “In our efforts to implement ‘information hiding’, we will no longer provide developers with direct access to the properties in our base classes. Instead, developers will have to access these properties via getters/setters so that we can better manage future upgrades to our engine classes without breaking existing user code.” Long-winded, but that’s how I read it.

[=Kory;188294]
I have been a professional software engineer for nearly two decades and I cringe when I see stuff like :
“TSubobjectPtr<> has been deprecated, along with all public subobject properties which will be made private in the 4.7 release. Going forward, classes should be designed so that all subobject properties are private and can only only be accessed through public Get*() functions.”

There is very little reason to make anything private in a class, you should be using protected instead of private. The base classes that inherit from the engine source will use the variables and if you require them to access the member variables through Get*() functions then that will add additional stack processing overhead. The only way to do that would be to make them inline, but at that point why not just make them protected and make the Get*() functions inline? Then you will have the best of both worlds. Restricted use for other classes via the Get*() functions, children classes can still use the member variables or the Get*() accessors (their choice), and you’ll reduce stack overhead. Even though computers are faster nowadays I hate to see unnecessary overhead in an industry that is performance driven.

I have worked on real-time distributed systems where performance and optimization were key otherwise people would get killed. Please consider the above as it comes with a lot of experience in designing software.
[/]

With regard to the references to our subobjects, would :

[]
TSubobjectPtr<class USkeletalMeshComponent> Body;
[/]

become:

[]
USkeletalMeshComponent* Body;
[/]

If yes, I wonder how they garbage collect these. Perhaps they can do it because we would still use PCIP to create the object.

[=]
The way I understand it is you only need to have a constructor with FObjectInitializer if you use “PCIP” to create a component. If you don’t need the PCIP object, then you don’t have to specify it as an argument in the constructor.

The new constructors don’t effect at all. You still have to create components and spawn actors the same way as before.
[/]

You them as UPROPERTY()
Anything that have UPROPERTY() macro is GC’d.

That makes sense. Thank you.

[=;188362]
You them as UPROPERTY()
Anything that have UPROPERTY() macro is GC’d.

Is it normal I can’t package my game for Linux? I get automatically an error.

FYI

I just download the new version of ShooterGame for 4.6 and when I compiled it and tried to run it, all I get is a black screen.

[=onlycalvin;188067]
how to use WebBrowser in Blueprint?

I’m afraid we don’t support it in blueprints yet. Just to clarify its usage too, since it is a developer module, it’s intended to be used in the editor and other programs rather than games. That makes it something we will largely be using internally but you could still make use of it.

The small controls help pop up in the bottom left of editor viewports uses it to display a html file and there is an example of its use as a web browser in the slateviewer example. The main class of interest is SWebBrowser.

[=getnamo;188309]
with FSlateApplication::OnControllerButtonPressed(FKey, int32, bool) changed to FSlateApplication::OnControllerButtonPressed(EControllerButtons::Type, int32, bool) in 4.6, what is the correct way to implement input mapping for custom keys in 4.6?
[/]

I’m interested in as it broke that functionality in one of my custom plugins and I’d like to use Input Mappings instead of binding Delegate’s in BPs as a workaround

[=Kory;188294]
I have been a professional software engineer for nearly two decades and I cringe when I see stuff like :
“TSubobjectPtr<> has been deprecated, along with all public subobject properties which will be made private in the 4.7 release. Going forward, classes should be designed so that all subobject properties are private and can only only be accessed through public Get*() functions.”

There is very little reason to make anything private in a class, you should be using protected instead of private. The base classes that inherit from the engine source will use the variables and if you require them to access the member variables through Get*() functions then that will add additional stack processing overhead. The only way to do that would be to make them inline, but at that point why not just make them protected and make the Get*() functions inline? Then you will have the best of both worlds. Restricted use for other classes via the Get*() functions, children classes can still use the member variables or the Get*() accessors (their choice), and you’ll reduce stack overhead. Even though computers are faster nowadays I hate to see unnecessary overhead in an industry that is performance driven.

I have worked on real-time distributed systems where performance and optimization were key otherwise people would get killed. Please consider the above as it comes with a lot of experience in designing software.
[/]

I agree on optimization should always come first and most people nowadays don’t program with that in mind. It’s possible since they have their own custom compiler that it specifically looks for the different UProperties and their respective accessor methods (ie Get*() const) and maybe does automatic inlining of those functions behind the scenes, but let’s not forget Unreal Engine 3 won awards for most optimized game engine so I’m sure they know what they are doing on one but it does sound iffy. I’m looking forward to hearing what they say about one but yes, it absolutely would add an additional call in many cases where it wouldn’t be needed.

What are the limitations of using shared samples? I heard the format must be the same for all textures, but do all the textures need to be the same size?

Hey guys

I bought a subscription back in the days if v 1.1 and cancelled my subscription the same month due to performance absolutely sucking on my system. My CPU and RAM were both far over the recommended limit but my GPU seemed to be the problem. I have heard that UE4 has undergone massive improvements on the Mac end but don’t want to buy a subscription again only to find my system is still not capable of more than 7 FPS when everything set to it’s lowest setting and all lights turned off (all except one but with no shadows)

Can someone please confirm for me how well UE4 runs nowadays on a 2011 model iMac, please?
2.7Ghz i5
12GB Ram
AMD Radion HD 6770M 512Mb

Will I be wasting my time getting UE4 again or how well does it run on these specs nowadays?

Thanks in advance for any feedback

[=DM_Actual;188316]
Hi Kory,

I’m wondering if perhaps Epic’s explanation is incomplete, which is leading to a misunderstanding. Epic can’t really control the visibility that we provide for our own subobjects, so I interpreted their explanation as, “In our efforts to implement ‘information hiding’, we will no longer provide developers with direct access to the properties in our base classes. Instead, developers will have to access these properties via getters/setters so that we can better manage future upgrades to our engine classes without breaking existing user code.” Long-winded, but that’s how I read it.

[/]

Hi ,
Yes, if they are purposefully trying to do to protect the state of the engine I can understand that from an Public API perspective. I guess all of the projects I have ever worked on were written by top-notch developers so we all knew what we should and shouldn’t be doing. If anything, I hope they at least inline them for things like GetMesh() and GetCapsuleComponent(), it was quite annoying to change all of those to remove the DEPRECATED warnings.

I have long thought that inheritance is one of the best things in C++ - however, my real experiences has slowly taught me otherwise. Inheritance will cause member variables which are protected before, exposed. And can cause bugs and frustrations and probably you will need to change the ancestor to suit the inheritor (which are double problems).
It is better to make it private of every member variables because you will want the inherited classes not to abuse them (ie using them in undocumented manners, or use them which cause crash and then blame UE4 - technical headache ).

Anyway, I do support composition over inheritance and therefore, I support the private over protected member variables.

Neat stuff.
Now to try and finally get a working context menu in umg, through actor component…

please, re-add the zipped download of third-party dependency. It was quicker to download, especially if you have more than one PC.

[=Alessiot89;188584]
please, re-add the zipped doenload of third-party dependency. It was quicker to download, especially if you have more than one PC.

I would love that too, for redist.
Not like piracy redist, of course, but for between workstations redist…

[=DrDude;188538]

Can someone please confirm for me how well UE4 runs nowadays on a 2011 model iMac, please?
2.7Ghz i5
12GB Ram
AMD Radion HD 6770M 512Mb

Will I be wasting my time getting UE4 again or how well does it run on these specs nowadays?

Thanks in advance for any feedback

Something is wrong with your setup. I’m using late-2009 iMac with an old HD4850 and I’ve got no low fps problems. And that was always like that.

oh!I see,thank you very much

Is it me or has the WASD functionality on the top down broke? Instead of facing the direction of the button pressed with A and D the character just constantly spirals, when S is pressed it always walks backwards, but then when W is pressed, instead of going up it moves like tank controls. If you uncheck “orient rotation to movement” then WASD works perfectly fine. Perhaps it’s done differently now than in 4.5.1?

After taking a look at the engine source for 4.6 input mapping, I noticed FSlateApplication::Get().ProcessKeyDownEvent(KeyEvent); and FSlateApplication::Get().ProcessAnalogInputEvent(AnalogInputEvent); are exposed, so using something like


bool EmitKeyDownEventForKey(FKey key, int32 user, bool repeat)
{
	FKeyEvent KeyEvent(key, FSlateApplication::Get().GetModifierKeys(), user, repeat, 0, 0);
	return FSlateApplication::Get().ProcessKeyDownEvent(KeyEvent);
}

Would approximate FSlateApplication::OnControllerButtonPressed(FKey, int32, bool);

Except that using KeyEvent() causes FKeyEvent::ToText(void)const implementation to be required in your implementation file, e.g.


FText FKeyEvent::ToText() const
{
	return NSLOCTEXT("Joystick Plugin Events", "Key", "Text");
}

which you cannot add because doing so causes error C4273: ‘FKeyEvent::ToText’ : inconsistent dll linkage.

Any guidance on adding custom input mapping in 4.6 epic? or has been broken without an engine patch?

Edit:
I guess you can suppress the warning with #pragma warning( disable:4273 ) but feels hacky, still would like to know the proper way to achieve