TriAxis-Games / RealtimeMeshComponent

Unreal Engine 5 plugin component for rendering runtime generated content.
https://rmc.triaxis.games/
Other
1.54k stars 407 forks source link

Compile error on Unreal 4.15.0 #37

Closed rongcuid closed 7 years ago

rongcuid commented 7 years ago

I get these errors:

1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Build started: Project: SandBox, Configuration: Development_Editor x64 ------
2>  Performing 6 actions (12 in parallel)
2>  RuntimeMeshComponent.generated.cpp
2>  Module.RuntimeMeshComponentEditor.cpp
2>d:\program files\epic games\ue_4.15\engine\source\runtime\coreuobject\public\UObject/Class.h(662): error C2280: 'FRuntimeMeshComponentPrePhysicsTickFunction &FRuntimeMeshComponentPrePhysicsTickFunction::operator =(const FRuntimeMeshComponentPrePhysicsTickFunction &)': attempting to reference a deleted function
2>  E:\Projects\Unreal\SandBox\Plugins\RuntimeMeshComponent\Source\RuntimeMeshComponent\Public\RuntimeMeshComponent.h(69): note: compiler has generated 'FRuntimeMeshComponentPrePhysicsTickFunction::operator =' here
2>  d:\program files\epic games\ue_4.15\engine\source\runtime\coreuobject\public\UObject/Class.h(997): note: see reference to function template instantiation 'bool CopyOrNot<CPPSTRUCT>(CPPSTRUCT *,const CPPSTRUCT *,int32)' being compiled
2>          with
2>          [
2>              CPPSTRUCT=FRuntimeMeshComponentPrePhysicsTickFunction
2>          ]
2>  d:\program files\epic games\ue_4.15\engine\source\runtime\coreuobject\public\UObject/Class.h(996): note: while compiling class template member function 'bool UScriptStruct::TCppStructOps<FRuntimeMeshComponentPrePhysicsTickFunction>::Copy(void *,const void *,int32)'
2>  E:\Projects\Unreal\SandBox\Plugins\RuntimeMeshComponent\Intermediate\Build\Win64\UE4Editor\Inc\RuntimeMeshComponent\RuntimeMeshComponent.generated.cpp(115): note: see reference to class template instantiation 'UScriptStruct::TCppStructOps<FRuntimeMeshComponentPrePhysicsTickFunction>' being compiled
2>e:\projects\unreal\sandbox\plugins\runtimemeshcomponent\source\runtimemeshcomponenteditor\private\RuntimeMeshComponentDetails.h(7): error C2504: 'IDetailCustomization': base class undefined
2>e:\projects\unreal\sandbox\plugins\runtimemeshcomponent\source\runtimemeshcomponenteditor\private\RuntimeMeshComponentDetails.h(13): error C3668: 'FRuntimeMeshComponentDetails::CustomizeDetails': method with override specifier 'override' did not override any base class methods
2>E:\Projects\Unreal\SandBox\Plugins\RuntimeMeshComponent\Source\RuntimeMeshComponentEditor\Private\RuntimeMeshComponentDetails.cpp(16): error C2440: 'return': cannot convert from 'SharedPointerInternals::FRawPtrProxy<FRuntimeMeshComponentDetails>' to 'TSharedRef<IDetailCustomization,0>'
2>  E:\Projects\Unreal\SandBox\Plugins\RuntimeMeshComponent\Source\RuntimeMeshComponentEditor\Private\RuntimeMeshComponentDetails.cpp(16): note: No constructor could take the source type, or constructor overload resolution was ambiguous
2>E:\Projects\Unreal\SandBox\Plugins\RuntimeMeshComponent\Source\RuntimeMeshComponentEditor\Private\RuntimeMeshComponentDetails.cpp(85): error C2027: use of undefined type 'IAssetTools'
2>  D:\Program Files\Epic Games\UE_4.15\Engine\Source\Developer\AssetTools\Public\AssetToolsModule.h(9): note: see declaration of 'IAssetTools'
2>E:\Projects\Unreal\SandBox\Plugins\RuntimeMeshComponent\Source\RuntimeMeshComponentEditor\Private\RuntimeMeshComponentDetails.cpp(85): error C2228: left of '.CreateUniqueAssetName' must have class/struct/union
2>ERROR : UBT error : Failed to produce item: E:\Projects\Unreal\SandBox\Plugins\RuntimeMeshComponent\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RuntimeMeshComponent.lib
2>  Total build time: 25.60 seconds (Local executor: 0.00 seconds)
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""D:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat" SandBoxEditor Win64 Development "E:\Projects\Unreal\SandBox\SandBox.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am new to Unreal, so I am not completely sure about how to fix it. It is the 2.0 release, and I will test on 4.13.2 too, later... I hope it can be fixed for 4.15.0

rongcuid commented 7 years ago

4.13 builds fine, so it is probably not my computer configuration problem. I guess the engine changes somewhat between the versions?

WiggleWizard commented 7 years ago

Pull down the latest branch, there's a fix for 4.15 in there

rongcuid commented 7 years ago

OK, now it works. Thank you.

rongcuid commented 7 years ago

Now I tried to make a simple mesh via this:

    TArray<FVector> Vertices;
    TArray<int32> Triangles;

    Vertices.Add(FVector(0, 0, 0));
    Vertices.Add(FVector(0, 100, 0));
    Vertices.Add(FVector(100, 100, 0));
    Vertices.Add(FVector(100, 0, 0));

    Triangles.Add(0);
    Triangles.Add(1);
    Triangles.Add(2);
    Triangles.Add(1);
    Triangles.Add(2);
    Triangles.Add(3);

    RuntimeMesh->CreateMeshSection(0, Vertices, Triangles, true, EUpdateFrequency::Average, ESectionUpdateFlags::CalculateNormalTangent);

However, I get the following error:

1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Build started: Project: SandBox415, Configuration: Development_Editor x64 ------
2>  Compiling game modules for hot reload
2>  Parsing headers for SandBox415Editor
2>    Running UnrealHeaderTool "E:\Projects\Unreal\SandBox415\SandBox415.uproject" "E:\Projects\Unreal\SandBox415\Intermediate\Build\Win64\SandBox415Editor\Development\SandBox415Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
2>  Reflection code generated for SandBox415Editor in 6.686382 seconds
2>  Performing 5 actions (12 in parallel)
2>  [3/5] Link UE4Editor-RuntimeMeshComponent-6125.lib
2>     Creating library E:\Projects\Unreal\SandBox415\Plugins\UE4RuntimeMeshComponent-master\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RuntimeMeshComponent-6125.lib and object E:\Projects\Unreal\SandBox415\Plugins\UE4RuntimeMeshComponent-master\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RuntimeMeshComponent-6125.exp
2>  RuntimeMeshTerrain.cpp
2>  SandBox415.generated.cpp
2>e:\projects\unreal\sandbox415\plugins\ue4runtimemeshcomponent-master\source\runtimemeshcomponent\public\RuntimeMeshSection.h(542): error C2039: 'TypeInfo': is not a member of 'FVector'
2>  E:\Projects\Unreal\SandBox415\Plugins\UE4RuntimeMeshComponent-master\Intermediate\Build\Win64\UE4Editor\Inc\RuntimeMeshComponent\RuntimeMeshComponent.generated.h(9): note: see declaration of 'FVector'
2>  e:\projects\unreal\sandbox415\plugins\ue4runtimemeshcomponent-master\source\runtimemeshcomponent\public\RuntimeMeshSection.h(542): note: while compiling class template member function 'const FRuntimeMeshVertexTypeInfo *FRuntimeMeshSection<VertexType>::GetVertexType(void) const'
2>          with
2>          [
2>              VertexType=FVector
2>          ]
2>  d:\program files\epic games\ue_4.15\engine\source\runtime\core\public\Templates/PointerIsConvertibleFromTo.h(18): note: see reference to class template instantiation 'FRuntimeMeshSection<VertexType>' being compiled
2>          with
2>          [
2>              VertexType=FVector
2>          ]
2>  d:\program files\epic games\ue_4.15\engine\source\runtime\core\public\Templates/SharedPointer.h(538): note: see reference to class template instantiation 'TPointerIsConvertibleFromTo<ObjectType,TSharedFromThis<ObjectType,0>>' being compiled
2>          with
2>          [
2>              ObjectType=FRuntimeMeshSection<FVector>
2>          ]
2>  E:\Projects\Unreal\SandBox415\Plugins\UE4RuntimeMeshComponent-master\Source\RuntimeMeshComponent\Public\RuntimeMeshComponent.h(171): note: see reference to class template instantiation 'TSharedPtr<FRuntimeMeshSection<VertexType>,0>' being compiled
2>          with
2>          [
2>              VertexType=FVector
2>          ]
2>  E:\Projects\Unreal\SandBox415\Source\SandBox415\DynamicTerrain\RuntimeMeshTerrain.cpp(33): note: see reference to function template instantiation 'void URuntimeMeshComponent::CreateMeshSection<FVector>(int32,TArray<FVector,FDefaultAllocator> &,TArray<ElementType,FDefaultAllocator> &,bool,EUpdateFrequency,ESectionUpdateFlags)' being compiled
2>          with
2>          [
2>              ElementType=int32
2>          ]
2>e:\projects\unreal\sandbox415\plugins\ue4runtimemeshcomponent-master\source\runtimemeshcomponent\public\RuntimeMeshSection.h(542): error C2065: 'TypeInfo': undeclared identifier
2>ERROR : UBT error : Failed to produce item: E:\Projects\Unreal\SandBox415\Binaries\Win64\UE4Editor-SandBox415-9470.dll
2>  Total build time: 23.59 seconds (Local executor: 0.00 seconds)
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""D:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat" SandBox415Editor Win64 Development "E:\Projects\Unreal\SandBox415\SandBox415.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I suspect this is another version update error. I can't find related information about TypeInfo on the engine API, but I will test on 4.13 too.

rongcuid commented 7 years ago

4.13 also does not work. So it is probably my part.

WiggleWizard commented 7 years ago

@Koderz I think this is closed now 👍

rongcuid commented 7 years ago

When would you consider releasing to Marketplace? Though I have no problem including it in game projects separately.

BTW, I have to say that the documentations are a little difficult to understand. Also, blueprints really slows down the editor.

Koderz commented 7 years ago

A little late but This has been published to the marketplace now.

I'm aware of the docs but don't have the time right now unfortunately to really update them and with v3 being a large overhaul I'll probably wait and try to update them for that.

blakeanator commented 7 years ago

I'm having this exact same issue. I'm on 4.16.2 and have the latest RMC. What's the best way to solve this? Also, oddly enough, I downloaded your sample project and run into the exact same error. Maybe it's a problem with my computer? Thanks for the help!

2>...\RuntimeMeshComponentDetails.h(7): error C2504: 'IDetailCustomization': base class undefined 2>...\RuntimeMeshComponentDetails.h(13): error C3668: 'FRuntimeMeshComponentDetails::CustomizeDetails': method with override specifier 'override' did not override any base class methods 2>...\RuntimeMeshComponentDetails.cpp(16): error C2440: 'return': cannot convert from 'SharedPointerInternals::FRawPtrProxy' to 'TSharedRef<IDetailCustomization,0>' 2>...\RuntimeMeshComponentDetails.cpp(16): note: No constructor could take the source type, or constructor overload resolution was ambiguous 2>...\RuntimeMeshComponentDetails.cpp(85): error C2027: use of undefined type 'IAssetTools' 2>...\AssetToolsModule.h(9): note: see declaration of 'IAssetTools' 2>...\RuntimeMeshComponentDetails.cpp(85): error C2228: left of '.CreateUniqueAssetName' must have class/struct/union 2>ERROR : UBT error : Failed to produce item: E:\Projects\Unreal\SandBox\Plugins\RuntimeMeshComponent\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-RuntimeMeshComponent.lib