# Error saving UAssetUserData on StaticMesh

**URL:** <https://forums.unrealengine.com/t/error-saving-uassetuserdata-on-staticmesh/352327>\
**Category:** Asset Creation\
**Tags:** UClass, unreal-engine, editor, question\
**Created:** [March 31, 2016, 2:37am UTC](https://forums.unrealengine.com/t/error-saving-uassetuserdata-on-staticmesh/352327 "2016-03-31T02:37:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![duke22](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@duke22](https://forums.unrealengine.com/u/duke22)\
**Post date:** [March 31, 2016, 2:37am UTC](https://forums.unrealengine.com/t/error-saving-uassetuserdata-on-staticmesh/352327/1 "2016-03-31T02:37:18Z")

</div>

I’m trying to add a custom UAssetUserData class to a static-mesh. This goes well up until the point I try to save the asset:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/0/608f21f7bda915106d6390503c86d7c0dafb8f81.jpeg) ](https://dl.dropboxusercontent.com/s/k8hkpon8iel4z10/UE4_msg.jpg?raw=1)

The class itself is pretty simple:

```
#pragma once

#include "Engine/AssetUserData.h"
#include "Engine/StaticMesh.h"

#include "OrbiverseStaticMeshData.generated.h"

UCLASS()
class ORBIVERSECORE_API UOrbiverseStaticMeshData
	: public UAssetUserData
{
	GENERATED_BODY()

public:
	UPROPERTY(BlueprintReadOnly, EditAnywhere)
	float LightmapTexelDensity;
};
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_67d829db](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_67d829db](https://forums.unrealengine.com/u/anonymous_user_67d829db)\
**Post date:** [July 8, 2016, 11:56pm UTC](https://forums.unrealengine.com/t/error-saving-uassetuserdata-on-staticmesh/352327/2 "2016-07-08T23:56:42Z")

</div>

The problem is not in what is inside your `UOrbiverseStaticMeshData`, but rather how it was created. When you call `NewObject`, make sure `Outer` is set to the `UStaticMesh` object that you plan on adding your mesh data to. By default, Outer is the Transient package, which is thrown away when you close Unreal.
