돌고래 홈페이지
ID:
PW:


  운영자(2022-08-13 18:59:59, Hit : 19, Vote : 0
 언리얼 C++ spawn 선택 스프라이트가 안보일떄

에디터/디테일 탭뷰에서 "Editor Billboard Scale" 항목이 안보인다.
C++에서 pawn만들때 위의 항목이 보이게 하기 위해서는 스프라이트를 만들어 줘야 한다.

C:\Program Files\Epic Games\UE_4.24\Engine\Content\EditorResources



https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=mw828081&logNo=220427686481


https://unrealcommunity.wiki/revisions/6100e80e9c9d1a89e0c305b6



#if WITH_EDITORONLY_DATA
SpriteComponent = ObjectInitializer.CreateEditorOnlyDefaultSubObject<UBillboardComponent>(this, TEXT("Sprite"));
ArrowComponent = ObjectInitializer.CreateEditorOnlyDefaultSubobject<UArrowComponent>(this, TEXT("Arrow"));

if(iIsRunningCommandlet())
{
    struct FConsttuctorStatics
    {
           ConstructorHelperrs::FObjectFinderOptional<UTexture2D> TrackTextureObject;
           FName ID_Track;
           FText  NAME_Track;
           FConstructorStatics()
                  : TrackTextureObject(TEXT("/Engine/EditorResources/EmptyAcor"))
                  , ID_Track(TEXT("Track"))
                  , NAME_Track(NSLOCTEXT("SpriteCategory", "Track", "Track"))
            {
            }
     };
     staticFConstructorStatics ConstructorStatics;

     if(SpriteComponent)
     {
             SpriteComponent->Sprite = ConstructorStatics.TrackTextureObject.Get();
             SpriteComponent->RelativeScale3D = FVector(0.5f, 0.5f, 0.5f);
             SpriteComponent->SpriteInfo.Category = ConstructorStatics.ID_Track;
                   SpriteComponent->SpriteInfo.DisplayName = ConstructorStatics.NAME_Track;
             SpriteComponent->SetureAttachment(RootComponent);
             SpriteComponent->bIsScreenSizeScaled = true;
                    //SpriteScale = 1.0f;
      }
      
      if(ArrowComponent)
              ArrowComponent->SetureAttachment(RootComponent);
}
#endif  // WITH_EDITORONLY_DATA




GetAllActorsOfClass 명령시 블루프린트 찾기
언리얼 책

Copyright 1999-2022 Zeroboard / skin by zero