x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Editor crashing when trying to load paper sprites during runtime.

Hello, so im using a object library to load assets from disk.

 TArray<UObject*> USpriterBlueprintFunctionLibrary::LoadObjectsFromPath(const FString& Path, TSubclassOf<UObject> ObjectClass, TArray<FString> ObjectNames)
 {
     UObjectLibrary* ObjectLibrary = UObjectLibrary::CreateLibrary(*ObjectClass, false, GIsEditor);
     if (ObjectLibrary != nullptr)
     {
         ObjectLibrary->AddToRoot();
         FString NewPath = TEXT("/Game") / Path;
         int32 NumOfAssetDatas = ObjectLibrary->LoadAssetDataFromPath(NewPath);
 
         if (NumOfAssetDatas > 0)
         {
             TArray<FAssetData> AssetDatas;
             ObjectLibrary->GetAssetDataList(AssetDatas);
 
             TArray<UObject*> Assets;
                     UObject* Asset;
 
             GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Cyan, TEXT("Found assets, attempting to load!"));
 
             if (ObjectNames.Num() > 0)
             {
                 for (int32 i = 0; i < AssetDatas.Num(); ++i)
                 {
                     FAssetData& AssetData = AssetDatas[i];
 
                     const FString FoundNameString = AssetData.AssetName.ToString();
 
                     if (!FoundNameString.IsEmpty() && ObjectNames.Contains<FString>(FoundNameString))
                     {
                                             Asset = AssetData.GetAsset();
                     if (Asset)
                     {
                         Assets.Add(AssetData.GetAsset());
                     }
                     }
                 }
 
                 return Assets;
             }
         }
     }
 
     GEngine->AddOnScreenDebugMessage(-1, 1.0f, FColor::Cyan, TEXT("Can't find assets at path!"));
     return TArray<UObject*>();
 }

This is the code for the function that is called to load the assets. This function works without a problem when trying to load AnimSequence's, but when i try to load Paper Sprite's im given this error before the crash.

 Fatal error: [File:C:\Users\Jacob\Desktop\UnrealEngine4Source\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 1969] 
 Object Class None created in SpriterSkeleton_C instead of Package // NOTE: SpriterSkeleton_C is the class that is calling this function
 




Product Version: UE Github Master branch
Tags:
more ▼

asked Feb 17 '16 at 07:37 AM in C++ Programming

avatar image

Diddykonga
100 14 18 25

avatar image Diddykonga Feb 22 '16 at 05:31 AM

Does anyone know why this only occurs with Paper Sprite Assets, while every other asset in UE4 loads correctly without crashing the editor?

avatar image Diddykonga Apr 05 '16 at 05:05 AM

Still having this issue, please ease my pain with a solution!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Try this - it worked for me!

"After testing the sample project and reviewing the documentation for LoadAssetDataFromPath (https://docs.unrealengine.com/latest/INT/Programming/Assets/AsyncLoading/index.html) I noticed that the call you make to LoadAssetDataFromPath() is missing "/Game" at the beginning of the path name. Adding this and recompiling the code should fix the crash."

Reference: https://answers.unrealengine.com/questions/334169/searching-the-default-ue4-save-path-crashes-the-en.html

more ▼

answered Nov 11 '16 at 01:29 AM

avatar image

ZEROONESTUDIO
25 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question