# Error on Project Packaging - must inherit UObject

**URL:** <https://forums.unrealengine.com/t/error-on-project-packaging-must-inherit-uobject/479920>\
**Category:** Platform & Builds\
**Tags:** error, uobject, unreal-engine, packaging-projects, question\
**Created:** [March 8, 2021, 2:38pm UTC](https://forums.unrealengine.com/t/error-on-project-packaging-must-inherit-uobject/479920 "2021-03-08T14:38:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmo74](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jmo74](https://forums.unrealengine.com/u/jmo74)\
**Post date:** [March 8, 2021, 2:38pm UTC](https://forums.unrealengine.com/t/error-on-project-packaging-must-inherit-uobject/479920/1 "2021-03-08T14:38:01Z")

</div>

Hi Everyone,

Very new to Unreal (also no knowledge about C++) so please bear with me. I have searched these forums to answer my issue but to no avail.

Upon Packaging my project for Windows, I get an error in the Output Log:

**Error: Class ‘AMyNewPlayerController’ must inherit UObject or a UObject-derived class**

```
#pragma once
 
 #include "Kismet/BlueprintFunctionLibrary.h"
 #include "GameFramework/PlayerController.h"
 #include "MyNewPlayerController.generated.h"
 
 /**
  * 
  */
 UCLASS()
 class YOURPROJECT_API AMyNewPlayerController ; public APlayerController
 {
 
     GENERATED_UCLASS_BODY()
 
 public:
     UFUNCTION(BlueprintCallable, Category = "YOURCATEGORY")
     static bool Viewport__SetMousePosition(const APlayerController* ThePC, const float& PosX, const float& PosY);
     
 };

```

I am very confused as I have only used Blueprints and never touched the code.

Your help is appreciated!

Jason

---

<div class="post-metadata">

**Author:** ![AndreeaMLU](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AndreeaMLU](https://forums.unrealengine.com/u/AndreeaMLU)\
**Post date:** [November 24, 2021, 3:47pm UTC](https://forums.unrealengine.com/t/error-on-project-packaging-must-inherit-uobject/479920/2 "2021-11-24T15:47:38Z")

</div>

Hello, did you solve the problem? I have the exact same one and I’m struggling to solve it ☹
