Files
UnrealEngineUWP/Engine/Source/Developer/HTML5/HTML5TargetPlatform/Private/HTML5TargetPlatform.h
Jamie Dale 0cfe5f0651 Added PlatformInfo to DesktopPlatform and improved the editors Supported Platform UI
TTP# 337136 - SETTINGS: Target Platform settings polish
TTP# 337652 - EDITOR: Limit Project supported Android icons down to 1
TTP# 337650 - EDITOR: There is only 1 icon for Apple for Project Supported Platforms

DesktopPlatform now contains a static array of FPlatformInfo. This can be used to query UE4 about its available platforms, even when they're not available as a target platform.

FPlatformInfo contains the information required by the editor (such as a localized display name and icon), as well as whether a platform is a variation ("flavor") of another, and if so, whether the flavor affects the build output (eg, Win32 or Win64), or the cook output (eg, Android_XYZ). This lets the editor build up nested menus for the "Package Project" and "Cook Project" options, rather than just showing everything as a flat list.

ReviewedBy Thomas.Sarkanen, Max.Preussner

[CL 2095796 by Jamie Dale in Main branch]
2014-06-05 12:13:44 -04:00

104 lines
2.9 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
HTML5TargetPlatform.h: Declares the FHTML5TargetPlatform class.
=============================================================================*/
#pragma once
#if WITH_ENGINE
#include "StaticMeshResources.h"
#endif // WITH_ENGINE
/**
* Implements the HTML5 target platform.
*/
class FHTML5TargetPlatform
: public TTargetPlatformBase<FHTML5PlatformProperties>
{
public:
/**
* Default constructor.
*/
FHTML5TargetPlatform( );
public:
// Begin ITargetPlatform interface
virtual void EnableDeviceCheck(bool OnOff) OVERRIDE {}
virtual void GetAllDevices( TArray<ITargetDevicePtr>& OutDevices ) const OVERRIDE;
virtual ECompressionFlags GetBaseCompressionMethod( ) const OVERRIDE;
virtual bool GenerateStreamingInstallManifest(const TMultiMap<FString, int32>& ChunkMap, const TSet<int32>& ChunkIDsInUse) const OVERRIDE
{
return true;
}
virtual ITargetDevicePtr GetDefaultDevice( ) const OVERRIDE;
virtual ITargetDevicePtr GetDevice( const FTargetDeviceId& DeviceId ) OVERRIDE;
virtual bool IsRunningPlatform( ) const OVERRIDE;
#if WITH_ENGINE
virtual void GetAllPossibleShaderFormats( TArray<FName>& OutFormats ) const OVERRIDE;
virtual void GetAllTargetedShaderFormats( TArray<FName>& OutFormats ) const OVERRIDE;
virtual const class FStaticMeshLODSettings& GetStaticMeshLODSettings() const OVERRIDE;
virtual void GetTextureFormats( const UTexture* InTexture, TArray<FName>& OutFormats ) const OVERRIDE;
virtual void GetReflectionCaptureFormats( TArray<FName>& OutFormats ) const OVERRIDE
{
OutFormats.Add(FName(TEXT("EncodedHDR")));
}
virtual const struct FTextureLODSettings& GetTextureLODSettings( ) const OVERRIDE;
virtual FName GetWaveFormat( class USoundWave* Wave ) const OVERRIDE;
#endif // WITH_ENGINE
DECLARE_DERIVED_EVENT(FHTML5TargetPlatform, ITargetPlatform::FOnTargetDeviceDiscovered, FOnTargetDeviceDiscovered);
virtual FOnTargetDeviceDiscovered& OnDeviceDiscovered( ) OVERRIDE
{
return DeviceDiscoveredEvent;
}
DECLARE_DERIVED_EVENT(FHTML5TargetPlatform, ITargetPlatform::FOnTargetDeviceLost, FOnTargetDeviceLost);
virtual FOnTargetDeviceLost& OnDeviceLost( ) OVERRIDE
{
return DeviceLostEvent;
}
// End ITargetPlatform interface
private:
// Holds the HTML5 engine settings.
FConfigFile HTML5EngineSettings;
// Holds the local device.
FHTML5TargetDevicePtr LocalDevice;
#if WITH_ENGINE
// Holds the cached target LOD settings.
FTextureLODSettings HTML5LODSettings;
// Holds the static mesh LOD settings.
FStaticMeshLODSettings StaticMeshLODSettings;
#endif
private:
// Holds an event delegate that is executed when a new target device has been discovered.
FOnTargetDeviceDiscovered DeviceDiscoveredEvent;
// Holds an event delegate that is executed when a target device has been lost, i.e. disconnected or timed out.
FOnTargetDeviceLost DeviceLostEvent;
};