I’d like to add a couple of more variable types (such as material instances and sounds) to the default PhysicalMaterial.h file so that I could retrieve them after shooting an object, for example, and use them to spawn sounds, bullet hole decals, etc. instead of having to look for the physical material in a library and then retrieving the variables from there as it would be a lot easier and better for performance to add the variables directly to the PhysicalMaterial.h class.
The problem is that if I add any variables that are not simple floats, booleans, integers, etc. I cannot compile the engine. I get all kinds of errors.
I’ve tried including the EngineTypes.h.h and Actor.h files in the PhysicalMaterial.h, but it didn’t help.
Is it possible to add any other variables, such as sounds, to the PhysicalMaterial.h file, or am I wasting my time?
You can add is the short answerr but why you want to do them in that ? Still if you show the compilation error we can take a look. I bet it needs physicscore.
What I would recommend though in terrms of this mechanics.
Make a base impact class that is spawned on a valid impact and just gets hit data from projectile or hitscan.
And on that class you can branch your things like sounds, decals, phsyics volumes, vfx and whatver rather than doing it in physical material .h
This way actually is very nice even if you want to push forward you can use that for footsteps, punches in the game which I do also, so you don’t have to think later on what happens when you hit/impact something, it becomes a logical container.
Upon compilation I get hundreds of errors from the seemingly unrelated files, mainly from InputCoreTypes.h.
I’ll post them here but the list is very long.
Severity Code Description Project File Line Suppression State
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 138
Error (active) E0145 member "FixedTagPrivate::FMapHandle::StoreIndexBits" may not be initialized UE4 ...\CoreUObject\Public\AssetRegistry\AssetDataTagMap.h 110
Error (active) E0028 expression must have a constant value UE4 ...\CoreUObject\Public\AssetRegistry\AssetDataTagMap.h 114
Error (active) E0145 member "FBulkDataStreamingToken::InvalidOffset" may not be initialized UE4 ...\CoreUObject\Public\Serialization\BulkData.h 132
Error (active) E0145 member "FBulkDataBase::InvalidToken" may not be initialized UE4 ...\CoreUObject\Public\Serialization\BulkData2.h 125
Error (active) E1574 static assertion failed with "TAtomic is only usable with trivial types" UE4 ...\Core\Public\Templates\Atomic.h 543
Error (active) E0145 member "FName::StringBufferSize" may not be initialized UE4 ...\Core\Public\UObject\NameTypes.h 471
Error (active) E0145 member "FNavigationLinkBase::InvalidUserId" may not be initialized UE4 ...\Engine\Classes\AI\Navigation\NavLinkDefinition.h 40
Error (active) E0145 member "FRayTracingGeometry::NonSharedVertexBuffers" may not be initialized UE4 ...\RenderCore\Public\RenderResource.h 665
Error (active) E0145 member "FShaderParameterBindings::kInvalidBufferIndex" may not be initialized UE4 ...\RenderCore\Public\Shader.h 601
Error C2061 syntax error: identifier 'UScriptStruct' ... ...\Intermediate\Build\Win64\UE4Editor\Inc\InputCore\InputCoreTypes.generated.h 22
Error C2061 syntax error: identifier 'UClass' ... ...\Intermediate\Build\Win64\UE4Editor\Inc\InputCore\InputCoreTypes.generated.h 97
Error C2061 syntax error: identifier 'UEnum' ... ...\Intermediate\Build\Win64\UE4Editor\Inc\InputCore\InputCoreTypes.generated.h 149
Error C2143 syntax error: missing ';' before 'identifier' ... ...\InputCore\Classes\InputCoreTypes.h 12
Error C2144 syntax error: 'FLogCategoryLogInput' should be preceded by ';' ... ...\InputCore\Classes\InputCoreTypes.h 12
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 12
Error C3433 'EControllerHand': all declarations of an enumeration must have the same underlying type, was 'unsigned char' now 'int' ... ...\InputCore\Classes\InputCoreTypes.h 38
Error C2079 'FKey' uses undefined struct 'INPUTCORE_API' ... ...\InputCore\Classes\InputCoreTypes.h 50
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 51
Error C2062 type 'Z_Construct_UScriptStruct_FKey_Statics' unexpected ... ...\InputCore\Classes\InputCoreTypes.h 51
Error C2989 'UScriptStruct': class template has already been declared as a non-class template ... ...\InputCore\Classes\InputCoreTypes.h 51
Error C2132 syntax error: unexpected identifier ... ...\InputCore\Classes\InputCoreTypes.h 51
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 54
Error C2373 'FKey': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 53
Error C4508 'FKey': function should return a value; 'void' return type assumed ... ...\InputCore\Classes\InputCoreTypes.h 55
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 58
Error C2373 'FKey': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 57
Error C2550 'FKey': constructor initializer lists are only allowed on constructor definitions ... ...\InputCore\Classes\InputCoreTypes.h 59
Error C4508 'FKey': function should return a value; 'void' return type assumed ... ...\InputCore\Classes\InputCoreTypes.h 60
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 63
Error C2373 'FKey': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 62
Error C2550 'FKey': constructor initializer lists are only allowed on constructor definitions ... ...\InputCore\Classes\InputCoreTypes.h 64
Error C4508 'FKey': function should return a value; 'void' return type assumed ... ...\InputCore\Classes\InputCoreTypes.h 65
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 68
Error C2373 'FKey': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 67
Error C2550 'FKey': constructor initializer lists are only allowed on constructor definitions ... ...\InputCore\Classes\InputCoreTypes.h 69
Error C4508 'FKey': function should return a value; 'void' return type assumed ... ...\InputCore\Classes\InputCoreTypes.h 70
Error C2270 'IsValid': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 72
Error C2270 'IsModifierKey': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 73
Error C2270 'IsGamepadKey': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 74
Error C2270 'IsTouch': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 75
Error C2270 'IsMouseButton': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 76
Error C2270 'IsButtonAxis': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 77
Error C2270 'IsAxis1D': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 78
Error C2270 'IsAxis2D': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 79
Error C2270 'IsAxis3D': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 80
Error C2270 'IsFloatAxis': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 82
Error C2270 'IsVectorAxis': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 84
Error C2270 'IsDigital': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 85
Error C2270 'IsAnalog': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 86
Error C2270 'IsBindableInBlueprints': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 87
Error C2270 'ShouldUpdateAxisWithoutSamples': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 88
Error C2270 'IsBindableToActions': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 89
Error C2270 'IsDeprecated': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 90
Error C2270 'GetDisplayName': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 91
Error C2270 'ToString': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 92
Error C2270 'GetFName': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 93
Error C2270 'GetMenuCategory': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 94
Error C2270 'GetPairedAxis': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 95
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 96
Error C2086 'int FKey': redefinition ... ...\InputCore\Classes\InputCoreTypes.h 96
Error C2146 syntax error: missing ';' before identifier 'GetPairedAxisKey' ... ...\InputCore\Classes\InputCoreTypes.h 96
Error C2061 syntax error: identifier 'FKey' ... ...\InputCore\Classes\InputCoreTypes.h 99
Error C2270 'ExportTextItem': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 99
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2143 syntax error: missing ',' before '&' ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2803 'operator ==' must have at least one formal parameter of class type ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2805 binary 'operator ==' has too few parameters ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C4459 declaration of 'FKey' hides global declaration ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2065 'KeyA': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2065 'KeyB': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2143 syntax error: missing ',' before '&' ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2803 'operator !=' must have at least one formal parameter of class type ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2805 binary 'operator !=' has too few parameters ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C4459 declaration of 'FKey' hides global declaration ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2065 'KeyA': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2065 'KeyB': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2143 syntax error: missing ',' before '&' ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2803 'operator <' must have at least one formal parameter of class type ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2805 binary 'operator <' has too few parameters ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C4459 declaration of 'FKey' hides global declaration ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2065 'KeyA': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2065 'KeyB': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2143 syntax error: missing ',' before '&' ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2084 function 'uint32 GetTypeHash(const int32)' already has a body ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C4459 declaration of 'FKey' hides global declaration ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2065 'Key': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 109
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 113
Error C2059 syntax error: 'private' ... ...\InputCore\Classes\InputCoreTypes.h 113
Error C2178 'KeyDetails' cannot be declared with 'mutable' specifier ... ...\InputCore\Classes\InputCoreTypes.h 118
Error C2270 'ConditionalLookupKeyDetails': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 120
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 122
Error C2059 syntax error: '}' ... ...\InputCore\Classes\InputCoreTypes.h 122
Error C2143 syntax error: missing ';' before '}' ... ...\InputCore\Classes\InputCoreTypes.h 122
Error C2923 'TStructOpsTypeTraits': 'FKey' is not a valid template type argument for parameter 'CPPSTRUCT' ... ...\InputCore\Classes\InputCoreTypes.h 125
Error C2913 explicit specialization; 'TStructOpsTypeTraits' is not a specialization of a class template ... ...\InputCore\Classes\InputCoreTypes.h 136
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 138
Error C2990 'INPUTCORE_API': non-class template has already been declared as a class template ... ...\InputCore\Classes\InputCoreTypes.h 141
Error C2079 'FKeyDetails' uses undefined struct 'INPUTCORE_API' ... ...\InputCore\Classes\InputCoreTypes.h 141
Error C2065 'GamepadKey': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 144
Error C2065 'Touch': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 145
Error C2065 'MouseButton': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 146
Error C2065 'ModifierKey': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 147
Error C2065 'NotBlueprintBindableKey': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 148
Error C2065 'Axis1D': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 149
Error C2065 'Axis3D': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 150
Error C2065 'UpdateAxisWithoutSamples': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 151
Error C2065 'NotActionBindableKey': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 152
Error C2065 'Deprecated': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 153
Error C2065 'ButtonAxis': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 156
Error C2065 'Axis2D': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 157
Error C2065 'FloatAxis': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 161
Error C2059 syntax error: 'attribute specifier' ... ...\InputCore\Classes\InputCoreTypes.h 161
Error C2143 syntax error: missing ';' before '}' ... ...\InputCore\Classes\InputCoreTypes.h 165
Error C2059 syntax error: '}' ... ...\InputCore\Classes\InputCoreTypes.h 165
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C2146 syntax error: missing ')' before identifier 'InKey' ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C3646 'InKey': unknown override specifier ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C2373 'FKeyDetails': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C1003 error count exceeds 100; stopping compilation ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C2061 syntax error: identifier 'UScriptStruct' ... ...\Intermediate\Build\Win64\UE4Editor\Inc\InputCore\InputCoreTypes.generated.h 22
Error C2061 syntax error: identifier 'UClass' ... ...\Intermediate\Build\Win64\UE4Editor\Inc\InputCore\InputCoreTypes.generated.h 97
Error C2061 syntax error: identifier 'UEnum' ... ...\Intermediate\Build\Win64\UE4Editor\Inc\InputCore\InputCoreTypes.generated.h 149
Error C2143 syntax error: missing ';' before 'identifier' ... ...\InputCore\Classes\InputCoreTypes.h 12
Error C2144 syntax error: 'FLogCategoryLogInput' should be preceded by ';' ... ...\InputCore\Classes\InputCoreTypes.h 12
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 12
Error C3433 'EControllerHand': all declarations of an enumeration must have the same underlying type, was 'unsigned char' now 'int' ... ...\InputCore\Classes\InputCoreTypes.h 38
Error C2079 'FKey' uses undefined struct 'INPUTCORE_API' ... ...\InputCore\Classes\InputCoreTypes.h 50
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 51
Error C2062 type 'Z_Construct_UScriptStruct_FKey_Statics' unexpected ... ...\InputCore\Classes\InputCoreTypes.h 51
Error C2989 'UScriptStruct': class template has already been declared as a non-class template ... ...\InputCore\Classes\InputCoreTypes.h 51
Error C2132 syntax error: unexpected identifier ... ...\InputCore\Classes\InputCoreTypes.h 51
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 54
Error C2373 'FKey': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 53
Error C4508 'FKey': function should return a value; 'void' return type assumed ... ...\InputCore\Classes\InputCoreTypes.h 55
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 58
Error C2373 'FKey': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 57
Error C2550 'FKey': constructor initializer lists are only allowed on constructor definitions ... ...\InputCore\Classes\InputCoreTypes.h 59
Error C4508 'FKey': function should return a value; 'void' return type assumed ... ...\InputCore\Classes\InputCoreTypes.h 60
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 63
Error C2373 'FKey': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 62
Error C2550 'FKey': constructor initializer lists are only allowed on constructor definitions ... ...\InputCore\Classes\InputCoreTypes.h 64
Error C4508 'FKey': function should return a value; 'void' return type assumed ... ...\InputCore\Classes\InputCoreTypes.h 65
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 68
Error C2373 'FKey': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 67
Error C2550 'FKey': constructor initializer lists are only allowed on constructor definitions ... ...\InputCore\Classes\InputCoreTypes.h 69
Error C4508 'FKey': function should return a value; 'void' return type assumed ... ...\InputCore\Classes\InputCoreTypes.h 70
Error C2270 'IsValid': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 72
Error C2270 'IsModifierKey': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 73
Error C2270 'IsGamepadKey': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 74
Error C2270 'IsTouch': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 75
Error C2270 'IsMouseButton': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 76
Error C2270 'IsButtonAxis': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 77
Error C2270 'IsAxis1D': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 78
Error C2270 'IsAxis2D': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 79
Error C2270 'IsAxis3D': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 80
Error C2270 'IsFloatAxis': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 82
Error C2270 'IsVectorAxis': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 84
Error C2270 'IsDigital': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 85
Error C2270 'IsAnalog': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 86
Error C2270 'IsBindableInBlueprints': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 87
Error C2270 'ShouldUpdateAxisWithoutSamples': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 88
Error C2270 'IsBindableToActions': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 89
Error C2270 'IsDeprecated': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 90
Error C2270 'GetDisplayName': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 91
Error C2270 'ToString': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 92
Error C2270 'GetFName': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 93
Error C2270 'GetMenuCategory': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 94
Error C2270 'GetPairedAxis': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 95
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 96
Error C2086 'int FKey': redefinition ... ...\InputCore\Classes\InputCoreTypes.h 96
Error C2146 syntax error: missing ';' before identifier 'GetPairedAxisKey' ... ...\InputCore\Classes\InputCoreTypes.h 96
Error C2061 syntax error: identifier 'FKey' ... ...\InputCore\Classes\InputCoreTypes.h 99
Error C2270 'ExportTextItem': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 99
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2143 syntax error: missing ',' before '&' ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2803 'operator ==' must have at least one formal parameter of class type ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2805 binary 'operator ==' has too few parameters ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C4459 declaration of 'FKey' hides global declaration ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2065 'KeyA': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2065 'KeyB': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 104
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2143 syntax error: missing ',' before '&' ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2803 'operator !=' must have at least one formal parameter of class type ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2805 binary 'operator !=' has too few parameters ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C4459 declaration of 'FKey' hides global declaration ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2065 'KeyA': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2065 'KeyB': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 105
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2143 syntax error: missing ',' before '&' ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2803 'operator <' must have at least one formal parameter of class type ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2805 binary 'operator <' has too few parameters ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C4459 declaration of 'FKey' hides global declaration ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2065 'KeyA': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2065 'KeyB': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 106
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2143 syntax error: missing ',' before '&' ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2084 function 'uint32 GetTypeHash(const int32)' already has a body ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C4459 declaration of 'FKey' hides global declaration ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2065 'Key': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 107
Error C2255 'friend': not allowed outside of a class definition ... ...\InputCore\Classes\InputCoreTypes.h 109
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 113
Error C2059 syntax error: 'private' ... ...\InputCore\Classes\InputCoreTypes.h 113
Error C2178 'KeyDetails' cannot be declared with 'mutable' specifier ... ...\InputCore\Classes\InputCoreTypes.h 118
Error C2270 'ConditionalLookupKeyDetails': modifiers not allowed on nonmember functions ... ...\InputCore\Classes\InputCoreTypes.h 120
Error C2988 unrecognizable template declaration/definition ... ...\InputCore\Classes\InputCoreTypes.h 122
Error C2059 syntax error: '}' ... ...\InputCore\Classes\InputCoreTypes.h 122
Error C2143 syntax error: missing ';' before '}' ... ...\InputCore\Classes\InputCoreTypes.h 122
Error C2923 'TStructOpsTypeTraits': 'FKey' is not a valid template type argument for parameter 'CPPSTRUCT' ... ...\InputCore\Classes\InputCoreTypes.h 125
Error C2913 explicit specialization; 'TStructOpsTypeTraits' is not a specialization of a class template ... ...\InputCore\Classes\InputCoreTypes.h 136
Error C2990 'INPUTCORE_API': non-class template has already been declared as a class template ... ...\InputCore\Classes\InputCoreTypes.h 141
Error C2079 'FKeyDetails' uses undefined struct 'INPUTCORE_API' ... ...\InputCore\Classes\InputCoreTypes.h 141
Error C2065 'GamepadKey': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 144
Error C2065 'Touch': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 145
Error C2065 'MouseButton': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 146
Error C2065 'ModifierKey': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 147
Error C2065 'NotBlueprintBindableKey': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 148
Error C2065 'Axis1D': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 149
Error C2065 'Axis3D': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 150
Error C2065 'UpdateAxisWithoutSamples': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 151
Error C2065 'NotActionBindableKey': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 152
Error C2065 'Deprecated': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 153
Error C2065 'ButtonAxis': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 156
Error C2065 'Axis2D': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 157
Error C2065 'FloatAxis': undeclared identifier ... ...\InputCore\Classes\InputCoreTypes.h 161
Error C2059 syntax error: 'attribute specifier' ... ...\InputCore\Classes\InputCoreTypes.h 161
Error C2143 syntax error: missing ';' before '}' ... ...\InputCore\Classes\InputCoreTypes.h 165
Error C2059 syntax error: '}' ... ...\InputCore\Classes\InputCoreTypes.h 165
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C2146 syntax error: missing ')' before identifier 'InKey' ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C3646 'InKey': unknown override specifier ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C2373 'FKeyDetails': redefinition; different type modifiers ... ...\InputCore\Classes\InputCoreTypes.h 167
Error C1003 error count exceeds 100; stopping compilation ... ...\InputCore\Classes\InputCoreTypes.h 167
Warning C4005 'TEXT': macro redefinition ... C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h 603
Warning C4996 'GIsRequestingExit': Please use IsEngineExitRequested()/RequestEngineExit(const FString&) Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. ... L:\...\Source\...\Private\BPFL_FunctionLibraryTaviana.cpp 249
Warning C4005 'TEXT': macro redefinition ... C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h 603
Error MSB3073 The command "...\Build\BatchFiles\Build.bat -Target="...Editor Win64 Development -Project=\"L:\...\....uproject\"" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 6. ... C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44
I tried making a child class of PhysicalMaterial.h, but the engine does not allow you to reparent physical material assets or create new ones based on that class, so you can’t assign them to your meshes.
So I was able to add some variables to PhysicalMaterial.h . I also tried to add something more complex like a MaterialInterface as you do with include “Materials/MaterialInterface.h”
reference to it and had no problems (with my limited knowledge)
Also you need to add Engine dependency to PhysicsCore.Build.cs or if there is a dependency.
When I directly edited the builded engine code however I get errors similar to your output, however when I build the engine from source have no issues as modified engine.
This being said, I would like to give a heads up for couple of things, just as opinion.
As logic I would expect here to have phsyics properties and coralated things as another class, like sound etc.
However If I was building a physics related feature in Engine, let’s say Sound Propagation which is coralated with porosity and density I would expect it to be listed here. That is a nice feature important for some of the competetive games like Siege. Can be many other physical properties like hardness etc. not subject of the this thread.
Or let’s say I want to build a new physics feature as Heat Dispersion. I would expect to see Heat Dispersion Coefficient to be here as well as melting point , freezing point etc. So in future I can add that to world landscape material and if there is a heatsource in game like a fireplace, I can do various things with physics like: melting snow, increasing the damage received from fire with distance, changing material visual effects like red hot metal etc. gameplay mechanics, like make stamina drain faster if you are in a very cold zone Many possibilities so it creates even more believable world with minimal effort.
However I would not expect to see a SoundFile, as physical material property, however can be if you need to, Imo those can be another class.
Let me know if this was helpfull.
PS: Thanks also your question push me to make space and time for building the source in my local development space.
When you say build from source, what does that mean? (I’m still relatively new to C++).
I’ve downloaded the engine source from Epic’s GitHUB, and compiled it on my computer.
Now I can open the engine files in Visual Studio and I can right-click on the engine and select build or rebuild. Is this what you mean or is there something else I have to do to compile from source?
Basically what epic says on that section all 7 of them.
The engine simply get all dependencies, compile and build when you try to run it from visual studio. Then you can open a project with this engine version, it will compile shaders for first time and run.
Simply if you followed steps as you said and its open in your VS
Set your solution configuration to Development Editor and your solution platform to Win64, then right click the UE5 target and select Build. It may take anywhere between 10 and 40 minutes to finish compiling, depending on your system specs.
(Which should be already default like that in solution)
Click run it will do build if it needs to do already.
When you make a change in engine code, let’s say PhysicalMaterial.h which is part of PhysicsCore feature, since we are adding UMaterialnstance dependency into it we need to give dependency in its build too (just include is not enough)
I’ve added the Engine and InputCore modules to the PhysicsCore.Build.cs:
using UnrealBuildTool;
public class PhysicsCore: ModuleRules
{
public PhysicsCore(ReadOnlyTargetRules Target) : base(Target)
{
PublicIncludePaths.Add("Runtime/PhysicsCore/Public");
PrivateDependencyModuleNames.AddRange(
new string[] {
"Core",
"CoreUObject",
"Engine",
"InputCore"
}
);
I’ve added the #include "Materials/MaterialInterface.h" to the top of my PhysicalMaterial.h file, and I’ve added the same variable that you did:
Not sure why you add inputcore as dependency however it should work. I 've tried and had no issues, one thing to try adding dependencies under PublicDependencyModuleNames rather than PrivateDependencyModuleNames, cause there can be circular dependencies.
Also not sure but error feels some files are missing so not recognised. Can be on build some files not generated in that regard so \BodySetupCore.cpp cannot initilize them. Also OnUpdatePhysXMaterial is similar.
Seems there is a dependency issue however, if you are only adding MaterialInferface to test should be ok. Are you using an old release of engine code? Cause physicscore is complaining about a dependency
I am not sure to be hontest if its an old engine version, don’t want to misdirect you about it. However UMaterialInterface dependency is same. I can try download older version to see if it replicates on my machine.
Hi again,
So download extract the EU 4, wanted a VS 2012-13 installed however I am not sure I am going to compile engine on my system, since I think it will get alot of older version dependencies from NuGet and a little bit afraid atm that it will corrupt my system.
However I still think
inconsistent dll linkage
refers to a missing dependency, try rebuilding without unneccessary dependencies. If you are adding a UMaterialInterface its dependency is Engine,
Did you modify other parts of the engine also? there could be some problems maybe cause of that aswell