Our sample games all seem to use the semi-deprecated Classes folder for their headers, and many of these headers omit a #pragma once (or other header guard).
This means that they don't play nicely when using the in-editor class wizard, as an attempt to include a header without a header guard results in multiply defined symbols and a build error. They also seem to have include path issues as the Classes headers can't be included by the Private source files.
I'd propose moving all of our samples over to use the Public or Private folder for their headers, and then ensure that they all have appropriate header guards. This will match better with what the editor expects, and removes the use of a semi-legacy feature from what should be "best practice" examples.
1) Open ShooterGame.
2) Create a new class derived from AShooterWeapon_Instant.
3) Observe that you get an error about a multiply included header.
4) Remove the include for the base class from your new classes header.
5) Observe that you get an error trying to include your new classes header.
6) Remove the include for your header from your new classes source file.
7) Observe that things now build. Steps 4 and 6 should not be required!
Request a info about UE-127172 bug tracker
I am not able to find world outliner how to enable it?
I cant package my project, tried to search online but could not find any answeres
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | Docs - Samples |
---|---|
Affects Versions | 4.7, 4.8 |
Target Fix | 4.8 |
Fix Commit | 2506631 |
---|
Created | Mar 30, 2015 |
---|---|
Resolved | Apr 9, 2015 |
Updated | Apr 27, 2018 |