Lots of work on look-at widgets
This commit is contained in:
@@ -6,14 +6,17 @@
|
||||
#include "CommonTypes.h"
|
||||
#include "AssetLookup.generated.h"
|
||||
|
||||
class AActor;
|
||||
class UUserWidget;
|
||||
class UlxLookAtWidget;
|
||||
class UStaticMesh;
|
||||
|
||||
UCLASS(MinimalAPI)
|
||||
class UlxAssetLookup : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
private:
|
||||
mutable FCriticalSection Mutex;
|
||||
|
||||
// Map from asset name to full loadable path.
|
||||
UPROPERTY()
|
||||
TMap<FName, FString> CachedTangibles;
|
||||
@@ -22,22 +25,40 @@ private:
|
||||
UPROPERTY()
|
||||
TMap<FName, FString> CachedStaticMeshes;
|
||||
|
||||
public:
|
||||
void RebuildIndex();
|
||||
// Map from asset name to full loadable path.
|
||||
UPROPERTY()
|
||||
TMap<FName, FString> CachedWidgets;
|
||||
|
||||
private:
|
||||
void ScanTangibles();
|
||||
void ScanStaticMeshes();
|
||||
void ScanWidgets();
|
||||
|
||||
// Get the full path name of a
|
||||
public:
|
||||
void RebuildIndex();
|
||||
|
||||
// Get the full LoadObject path of a Tangible.
|
||||
FString TangibleLoadPath(const FName &AssetName) const;
|
||||
|
||||
// Get a static mesh by its asset name.
|
||||
// Get the full LoadObject path of a Static Mesh.
|
||||
FString StaticMeshLoadPath(const FName &AssetName) const;
|
||||
|
||||
// Get the full LoadObject path of a Widget Blueprint.
|
||||
FString WidgetLoadPath(const FName &AssetName) const;
|
||||
|
||||
// Get a static mesh by name
|
||||
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Miscellaneous")
|
||||
static UStaticMesh *GetStaticMeshByName(const UObject *Context, const FString &Name);
|
||||
|
||||
// Get a static mesh by name
|
||||
// Get a tangible class by name
|
||||
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Miscellaneous")
|
||||
static UClass *GetTangibleClassByName(const UObject *Context, const FString &Name);
|
||||
static TSubclassOf<AActor> GetTangibleClassByName(const UObject *Context, const FString &Name);
|
||||
|
||||
// Get a widget blueprint by name
|
||||
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Miscellaneous")
|
||||
static TSubclassOf<UUserWidget> GetWidgetByName(const UObject *Context, const FString &Name);
|
||||
|
||||
// Get a look-at widget blueprint by name
|
||||
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Miscellaneous")
|
||||
static TSubclassOf<UlxLookAtWidget> GetLookAtWidgetByName(const UObject *Context, const FString &Name);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user