“/Game/CubicColony/Blueprints/Zabawa/ZabawnaKostka.ZabawnaKostka” is not a Package. It is a class. “/Game/CubicColony/Blueprints/Zabawa/ZabawnaKostka” Is a package. Your code looks for a class it can cast to a package. Which will always return null. And Do Nothing.