Can't compile on ue and have : was modified or is new

Hello,
i started unreal engine a few days ago, every thing was going well but i tried to compile and get this message :
---------- Creating patch ----------
Running D:\UE_5.3\Engine\Build\BatchFiles\Build.bat -Target=“MultiplyOrReleaseEditor Win64 Development -Project=”“C:/Users/slnob/OneDrive/Documents/Unreal Projects/MultiplyOrRelease/MultiplyOrRelease.uproject”“” -LiveCoding -LiveCodingModules=“D:/UE_5.3/Engine/Intermediate/LiveCodingModules.json” -LiveCodingManifest=“D:/UE_5.3/Engine/Intermediate/LiveCoding.json” -WaitMutex
Using bundled DotNet SDK version: 6.0.302
Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” -Target=“MultiplyOrReleaseEditor Win64 Development -Project=”“C:/Users/slnob/OneDrive/Documents/Unreal Projects/MultiplyOrRelease/MultiplyOrRelease.uproject”“” -LiveCoding -LiveCodingModules=“D:/UE_5.3/Engine/Intermediate/LiveCodingModules.json” -LiveCodingManifest=“D:/UE_5.3/Engine/Intermediate/LiveCoding.json” -WaitMutex
Log file: C:\Users\slnob\AppData\Local\UnrealBuildTool\Log.txt
Target is up to date
Total execution time: 0.54 seconds
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\BCRouge.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\BCRouge.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Balle1.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Balle1.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Balle2.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Balle2.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Direction2.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Direction2.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\MultiplyOrRelease.init.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\MyActor.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\MyActor.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\MyGameInstance.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\MyGameInstance.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\PointBalle2.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\PointBalle2.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Release.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Release.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Texte1.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Texte1.gen.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Texte2.cpp.obj was modified or is new
File C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplyOrRelease\Texte2.gen.cpp.obj was modified or is new
Building patch from 21 file(s) for Live coding module C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Binaries\Win64\UnrealEditor-MultiplyOrRelease.dll
Création de la bibliothèque C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Binaries\Win64\UnrealEditor-MultiplyOrRelease.patch_0.lib et de l’objet C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Binaries\Win64\UnrealEditor-MultiplyOrRelease.patch_0.exp
BCRouge.gen.cpp.obj : error LNK2019: symbole externe non résolu “__declspec(dllimport) private: static class UClass * __cdecl UPhysicalMaterial::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UPhysicalMaterial@@CAPEAVUClass@@XZ) référencé dans la fonction “class UPhysicalMaterial * __cdecl NewObject(class UObject *)” (??$NewObject@VUPhysicalMaterial@@@@YAPEAVUPhysicalMaterial@@PEAVUObject@@@Z)
BCRouge.cpp.obj : error LNK2001: symbole externe non résolu “__declspec(dllimport) private: static class UClass * __cdecl UPhysicalMaterial::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UPhysicalMaterial@@CAPEAVUClass@@XZ)
Conseil sur les symboles définis et susceptibles de correspondre :
“__declspec(dllimport) private: static class UClass * __cdecl UBoxComponent::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UBoxComponent@@CAPEAVUClass@@XZ)
“__declspec(dllimport) private: static class UClass * __cdecl UGameInstance::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UGameInstance@@CAPEAVUClass@@XZ)
“__declspec(dllimport) private: static class UClass * __cdecl UProjectileMovementComponent::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UProjectileMovementComponent@@CAPEAVUClass@@XZ)
“__declspec(dllimport) private: static class UClass * __cdecl USkeletalMeshComponent::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@USkeletalMeshComponent@@CAPEAVUClass@@XZ)
“__declspec(dllimport) private: static class UClass * __cdecl UStaticMesh::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UStaticMesh@@CAPEAVUClass@@XZ)
“__declspec(dllimport) private: static class UClass * __cdecl UStaticMeshComponent::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UStaticMeshComponent@@CAPEAVUClass@@XZ)
“__declspec(dllimport) private: static class UClass * __cdecl UTextRenderComponent::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UTextRenderComponent@@CAPEAVUClass@@XZ)
C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Binaries\Win64\UnrealEditor-MultiplyOrRelease.patch_0.exe : fatal error LNK1120: 1 externes non résolus
Failed to link patch (0.000s) (Exit code: 0x460)

My code runs well, but i think i have modifie something and so i can’t run it anymore.
Do you have any idee to solve this ?
Thanks !

Could you post your .build file? Looks like you might be missing some critical dependencies.

What file ? The one with the code ? Or this one :

MultiplyOrRelease.Build.cs :

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;

public class MultiplyOrRelease : ModuleRules
{
public MultiplyOrRelease(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

	PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

	PrivateDependencyModuleNames.AddRange(new string[] {  });

	// Uncomment if you are using Slate UI
	// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
	
	// Uncomment if you are using online features
	// PrivateDependencyModuleNames.Add("OnlineSubsystem");

	// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}

}

Thanks !

UPhysicalMaterial requires the module PhysicsCore and the header

#include "PhysicalMaterials/PhysicalMaterial.h"

As for the component errors make sure you include their headers where they are used

#include "Components/SkeletalMeshComponent.h"

#include "Components/StaticMeshComponent.h"

#include "Engine/GameInstance.h"

#include "Components/BoxComponent.h"

#include "Components/TextRenderComponent.h"

etc

Hello, thank you so much, it’s not the solution as i have already put those.

For the others, the error didn’t come from the sentence : was modifie or is new !
According to me it was from a part of the code

Thanks to you a can continue to code !

PS : I have another issue , i make a ball spawn in c++ and i would like the asign her a physicalmesh throught c++, how can i do this ? ( i want to remove friction ) Thanks !

Thanks ! It wasn’t the solution but help me to find it (the physicalMesh)

example

create static or skeletal mesh in cdo

SKMeshComp = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("Skeletal Mesh Comp"));
SMMeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Static Mesh Comp"));	

Then you can call

SKMeshComp->SetPhysMaterialOverride(PhysMat);
SMMeshComp->SetPhysMaterialOverride(PhysMat);

Where PhysMat is a pointer to a UPhysicalMaterial instance. So you can add this in the header

UPROPERTY(EditAnywhere, BlueprintReadWrite)
TObjectPtr<UPhysicalMaterial> PhysMat;

and set it from the editor if needed

Thanks, everything works, but how do you go to the editor to selecte and change this physical material ? (To have the same thing as your screenshot thanks ! )

Adding this to the header

UPROPERTY(EditAnywhere, BlueprintReadWrite)
TObjectPtr<UPhysicalMaterial> PhysMat;

exposes the variable “PhysMat” to the editor so that you can choose it and later during gameplay assign it in place of the default one.

You can rename PhysMat if you want it to be more descriptive.

I put this in the header, just after include, but how do i get this page ?

You need to put it below the public property.

When you have you header file

#pragma once

// includes here 


// class definition here
UCLASS()
class MYPROJECT_API AMyActor : public AActor 
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actors properties
	AMyActor();

/// needs to be below public declaration 

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TObjectPtr<UPhysicalMaterial> PhysMat;
};

I did it but then where do i found your screen page ?
PS : Thank you so much to reply so fast and enabling me to continue my programmation

The parameter should show up in the details panel of the actor where you added the UPROPERTY with the TObjectPtr to the UPhysicalMaterial.
If you do not have an actor yet, then create a new blueprint actor based on the c++ file you created with the exposed property.

Hello, i tried your code but when i put :

UPROPERTY(EditAnywhere, BlueprintReadWrite)
TObjectPtr PhysMat;

i get :

Building patch from 4 file(s) for Live coding module C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Binaries\Win64\UnrealEditor-MultiplyOrRelease.dll
Création de la bibliothèque C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Binaries\Win64\UnrealEditor-MultiplyOrRelease.patch_2.lib et de l’objet C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Binaries\Win64\UnrealEditor-MultiplyOrRelease.patch_2.exp
BCRouge.gen.cpp.obj : error LNK2019: symbole externe non résolu “__declspec(dllimport) class UClass * __cdecl Z_Construct_UClass_UPhysicalMaterial_NoRegister(void)” (_imp?Z_Construct_UClass_UPhysicalMaterial_NoRegister@@YAPEAVUClass@@XZ) référencé dans la fonction “void __cdecl `dynamic initializer for ‘public: static struct UECodeGen_Private::FObjectPropertyParams const Z_Construct_UClass_ABCRouge_Statics::NewProp_PhysMat’'(void)” (??__E?NewProp_PhysMat@Z_Construct_UClass_ABCRouge_Statics@@2UFObjectPropertyParams@UECodeGen_Private@@B@@YAXXZ)
C:\Users\slnob\OneDrive\Documents\Unreal Projects\MultiplyOrRelease\Binaries\Win64\UnrealEditor-MultiplyOrRelease.patch_2.exe : fatal error LNK1120: 1 externes non résolus
Failed to link patch (0.000s) (Exit code: 0x460)

i don’t know why

Because you made a TObjectPtr without designating the class. It should be:

	TObjectPtr<UPhysicalMaterial> PhysMat;

The part UPhysicalMaterial is critical. It describes to what class the pointer is pointing to.

Don’t forget to add the module PhysicsCore to your build files dependencies.

well, i put the same thing as you, just when i copy, it removes this part : <UPhysicalMaterial i don’t know why

To add the module, i put it in the #includes ? + i had previously tried this : UPhysicalMaterial* PhysicalMaterial = NewObject(); but i didn’t work as well

modules are added in the .build file to private or public module dependencies

file: YOURPROJECTNAME.Build.cs

there you have

  • PublicDependencyModuleNames
  • PrivateDependencyModuleNames

example of adding the PhysicsCore module:

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput", "PhysicsCore" });

i put this module and have no more issue due to this, thank you ! Unfortunatly, i had other issues :

  • BCRouge actor (the one which has the phys mat ) when it spawns don’t have the physmat → MaterialBC attached. I can only add MaterialBC to the physmat to BCRouge actors already in the world.
  • The MaterialBC put friction to 0 and bounciness/restitution to 1 nevertheless the actor (already in the world) lose speed. I would like to spawn an actor that doesn’t lose speed despite collisions.

Set the physics override material in the cdo (c++ constructor)