Cannot load the project in UE5.2

Greetings!

The initial project template is in UE4, and I cannot convert it to my UE5 version (I am getting a build error), so I cannot move further with this course. Will it be able to provide the entire zip file for the Toon Tank project in UE5?

There’s no issue on my end loading the provided zip in UE5. Also there shouldn’t be a build error as there’s nothing to build.

Are you sure you downloaded the right zip? If you downloaded the source from GitLab then that would explain things. Use the zip that is in the resources for the lecture.

Thank you for your prompt reply.

When I download the zip(starting template) from this lecture’s resource section, it works fine in UE5. You are correct!

But if I try to convert the whole project to UE5 from the following GitLab link: Polish And Wrap-Up (25e3c488) · Commits · GameDev.tv / Unreal 5 CPP / Toon Tanks UE4 · GitLab

It doesn’t work.

I wondered if there is any way to get the completed project readily converted in UE5. Thanks :slight_smile:

Because a certain API was deprecated and then removed in engine versions later than what the code was originally written in; this is mentioned in the lectures and comments in the code.

Make the following changes

Source/ToonTanks/BasePawn.cpp

────────────────────────────────────────┐
39: void ABasePawn::HandleDestruction() │
────────────────────────────────────────┘
    }
    if (DeathCameraShakeClass)
    {
-        GetWorld()->GetFirstPlayerController()->ClientPlayCameraShake(DeathCameraShakeClass);
+        GetWorld()->GetFirstPlayerController()->ClientStartCameraShake(DeathCameraShakeClass);
    }
}


Source/ToonTanks/BasePawn.h

─────────────┐
47: private: │
─────────────┘
    class USoundBase *DeathSound;

    UPROPERTY(EditAnywhere, Category = "Combat")
-    TSubclassOf<class UCameraShake> DeathCameraShakeClass;
+    TSubclassOf<class UCameraShakeBase> DeathCameraShakeClass;
};

Source/ToonTanks/Projectile.cpp

─────────────────────────────────────────────────────────────────────────────────────┐
68: void AProjectile::OnHit(UPrimitiveComponent *HitComp, AActor *OtherActor, UPrimi │
─────────────────────────────────────────────────────────────────────────────────────┘
        if (HitCameraShakeClass)
        {
            // UE 4.25 - ClientPlayCameraShake; UE 4.26+ ClientStartCameraShake
-            GetWorld()->GetFirstPlayerController()->ClientPlayCameraShake(HitCameraShakeClass);
+            GetWorld()->GetFirstPlayerController()->ClientStartCameraShake(HitCameraShakeClass);
        }
    }
    Destroy();

Source/ToonTanks/Projectile.h

─────────────┐
48: private: │
─────────────┘

    // UE 4.25 - UCameraShake; UE 4.26+ UMatineeCameraShake
    UPROPERTY(EditAnywhere, Category = "Combat")
-    TSubclassOf<class UCameraShake> HitCameraShakeClass;
+    TSubclassOf<class UCameraShakeBase> HitCameraShakeClass;

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms