More work on the Asset Lookup system.
This commit is contained in:
Binary file not shown.
Binary file not shown.
BIN
Content/Luprex/lxGameMode.uasset
LFS
BIN
Content/Luprex/lxGameMode.uasset
LFS
Binary file not shown.
BIN
Content/StaticMeshes/SM_Cube.uasset
LFS
Normal file
BIN
Content/StaticMeshes/SM_Cube.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/StaticMeshes/SM_Sphere.uasset
LFS
Normal file
BIN
Content/StaticMeshes/SM_Sphere.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/TanActor.uasset
LFS
BIN
Content/TanActor.uasset
LFS
Binary file not shown.
BIN
Content/Tangibles/TAN_Character.uasset
LFS
Normal file
BIN
Content/Tangibles/TAN_Character.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Tangibles/TAN_StaticMesh.uasset
LFS
Normal file
BIN
Content/Tangibles/TAN_StaticMesh.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -36,7 +36,6 @@ void UlxAssetLookup::ScanStaticMeshes()
|
|||||||
{
|
{
|
||||||
TArray<FAssetData> FoundData;
|
TArray<FAssetData> FoundData;
|
||||||
FARFilter AssetFilter;
|
FARFilter AssetFilter;
|
||||||
AssetFilter.PackagePaths.Add(FName(TEXT("/Game/StarterContent/Shapes")));
|
|
||||||
AssetFilter.PackagePaths.Add(FName(TEXT("/Game/StaticMeshes")));
|
AssetFilter.PackagePaths.Add(FName(TEXT("/Game/StaticMeshes")));
|
||||||
AssetFilter.ClassPaths.Add(UStaticMesh::StaticClass()->GetClassPathName());
|
AssetFilter.ClassPaths.Add(UStaticMesh::StaticClass()->GetClassPathName());
|
||||||
AssetFilter.bIncludeOnlyOnDiskAssets = true;
|
AssetFilter.bIncludeOnlyOnDiskAssets = true;
|
||||||
@@ -72,7 +71,7 @@ FString UlxAssetLookup::StaticMeshLoadPath(const FName &AssetName) const
|
|||||||
UStaticMesh *UlxAssetLookup::GetStaticMeshByName(const UObject *Context, const FString &Name)
|
UStaticMesh *UlxAssetLookup::GetStaticMeshByName(const UObject *Context, const FString &Name)
|
||||||
{
|
{
|
||||||
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(Context);
|
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(Context);
|
||||||
FString Path = mode->GetAssetLookup()->StaticMeshLoadPath(FName(Name));
|
FString Path = mode->GetAssetLookup()->StaticMeshLoadPath(FName(FString("SM_") + Name));
|
||||||
if (Path.IsEmpty())
|
if (Path.IsEmpty())
|
||||||
{
|
{
|
||||||
UE_LOG(LogLuprexIntegration, Error, TEXT("Static mesh not on search path: %s"), *Name);
|
UE_LOG(LogLuprexIntegration, Error, TEXT("Static mesh not on search path: %s"), *Name);
|
||||||
@@ -91,7 +90,7 @@ UStaticMesh *UlxAssetLookup::GetStaticMeshByName(const UObject *Context, const F
|
|||||||
|
|
||||||
UClass *UlxAssetLookup::GetTangibleClassByName(const UObject *Context, const FString &Name) {
|
UClass *UlxAssetLookup::GetTangibleClassByName(const UObject *Context, const FString &Name) {
|
||||||
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(Context);
|
ALuprexGameModeBase *mode = ALuprexGameModeBase::FromContext(Context);
|
||||||
FString Path = mode->GetAssetLookup()->TangibleLoadPath(FName(FString("Tan") + Name));
|
FString Path = mode->GetAssetLookup()->TangibleLoadPath(FName(FString("TAN_") + Name));
|
||||||
if (Path.IsEmpty())
|
if (Path.IsEmpty())
|
||||||
{
|
{
|
||||||
UE_LOG(LogLuprexIntegration, Error, TEXT("Tangible not on search path: %s"), *Name);
|
UE_LOG(LogLuprexIntegration, Error, TEXT("Tangible not on search path: %s"), *Name);
|
||||||
|
|||||||
Reference in New Issue
Block a user