# How to solve problem of TSoftObjectPtr Get() asset fail in packaged build?

**URL:** <https://forums.unrealengine.com/t/how-to-solve-problem-of-tsoftobjectptr-get-asset-fail-in-packaged-build/414109>\
**Category:** Platform & Builds\
**Tags:** asset-pointer, unreal-engine, question\
**Created:** [January 9, 2018, 3:20am UTC](https://forums.unrealengine.com/t/how-to-solve-problem-of-tsoftobjectptr-get-asset-fail-in-packaged-build/414109 "2018-01-09T03:20:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![doneykoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doneykoo](https://forums.unrealengine.com/u/doneykoo)\
**Post date:** [January 9, 2018, 3:20am UTC](https://forums.unrealengine.com/t/how-to-solve-problem-of-tsoftobjectptr-get-asset-fail-in-packaged-build/414109/1 "2018-01-09T03:20:47Z")

</div>

I have a TSoftObjectPtr UIBlueprint property.

It refers to the asset:

> WidgetBlueprint’/Game/UI/BP\_PickupInfoFloatUI\_Weapon.BP\_PickupInfoFloatUI\_Weapon’

However when I load the asset by _UIBlueprint.Get()_, called during BeginPlay() of an actor component.  
it only works in Editor, returning a valid _UBlueprint_\* pointer.  
But it always fails in packaged build, returning a _nullptr_.  
How to solve it?

---

<div class="post-metadata">

**Author:** ![doneykoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doneykoo](https://forums.unrealengine.com/u/doneykoo)\
**Post date:** [January 9, 2018, 9:07am UTC](https://forums.unrealengine.com/t/how-to-solve-problem-of-tsoftobjectptr-get-asset-fail-in-packaged-build/414109/2 "2018-01-09T09:07:33Z")

</div>

update: I’ve tried following the approach in Unreal Doc: Referencing Assets | Unreal Engine, using codes as:

```
    UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category=Building)
    TSoftObjectPtr<UStaticMesh> BaseMesh;
    
    UStaticMesh* GetLazyLoadedMesh()
    {
        if (BaseMesh.IsPending())
        {
            const FSoftObjectPath& AssetRef = BaseMesh.ToStringReference();
            BaseMesh = Cast< UStaticMesh>(Streamable.SynchronousLoad(AssetRef));
        }
        return BaseMesh.Get();
    }

```

But still, the asset is only loaded successfully in editor play. While fails by just returning a nullptr in packaged game play.

---

<div class="post-metadata">

**Author:** ![Noowai](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Noowai](https://forums.unrealengine.com/u/Noowai)\
**Post date:** [January 28, 2018, 8:28pm UTC](https://forums.unrealengine.com/t/how-to-solve-problem-of-tsoftobjectptr-get-asset-fail-in-packaged-build/414109/3 "2018-01-28T20:28:40Z")

</div>

I double this question! Been onto it since 4.16, but no luck on how async load should work with c++ yet

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [December 2, 2024, 5:31am UTC](https://forums.unrealengine.com/t/how-to-solve-problem-of-tsoftobjectptr-get-asset-fail-in-packaged-build/414109/4 "2024-12-02T05:31:00Z")

</div>

you need to load it.  
Using LoadSynchronous() this works in ue 5+
