Refactor Streaming with new settings and textures streaming configuration
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "Engine/Content/AssetReference.h"
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
#include "Engine/Engine/Globals.h"
|
||||
#include "Engine/Streaming/StreamingSettings.h"
|
||||
|
||||
class GameSettingsService : public EngineService
|
||||
{
|
||||
@@ -42,6 +43,7 @@ IMPLEMENT_SETTINGS_GETTER(TimeSettings, Time);
|
||||
IMPLEMENT_SETTINGS_GETTER(AudioSettings, Audio);
|
||||
IMPLEMENT_SETTINGS_GETTER(PhysicsSettings, Physics);
|
||||
IMPLEMENT_SETTINGS_GETTER(InputSettings, Input);
|
||||
IMPLEMENT_SETTINGS_GETTER(StreamingSettings, Streaming);
|
||||
|
||||
#if !USE_EDITOR
|
||||
#if PLATFORM_WINDOWS
|
||||
@@ -130,6 +132,7 @@ bool GameSettings::Load()
|
||||
PRELOAD_SETTINGS(Navigation);
|
||||
PRELOAD_SETTINGS(Localization);
|
||||
PRELOAD_SETTINGS(GameCooking);
|
||||
PRELOAD_SETTINGS(Streaming);
|
||||
#undef PRELOAD_SETTINGS
|
||||
|
||||
// Apply the game settings to the engine
|
||||
@@ -157,6 +160,7 @@ void GameSettings::Apply()
|
||||
APPLY_SETTINGS(AudioSettings);
|
||||
APPLY_SETTINGS(LayersAndTagsSettings);
|
||||
APPLY_SETTINGS(PhysicsSettings);
|
||||
APPLY_SETTINGS(StreamingSettings);
|
||||
APPLY_SETTINGS(InputSettings);
|
||||
APPLY_SETTINGS(GraphicsSettings);
|
||||
APPLY_SETTINGS(NavigationSettings);
|
||||
@@ -202,6 +206,7 @@ void GameSettings::Deserialize(DeserializeStream& stream, ISerializeModifier* mo
|
||||
DESERIALIZE(Navigation);
|
||||
DESERIALIZE(Localization);
|
||||
DESERIALIZE(GameCooking);
|
||||
DESERIALIZE(Streaming);
|
||||
|
||||
// Per-platform settings containers
|
||||
DESERIALIZE(WindowsPlatform);
|
||||
|
||||
@@ -91,6 +91,12 @@ namespace FlaxEditor.Content.Settings
|
||||
[EditorOrder(1050), EditorDisplay("Other Settings"), AssetReference(typeof(BuildSettings), true), Tooltip("Reference to Build Settings asset")]
|
||||
public JsonAsset GameCooking;
|
||||
|
||||
/// <summary>
|
||||
/// Reference to <see cref="StreamingSettings"/> asset.
|
||||
/// </summary>
|
||||
[EditorOrder(1060), EditorDisplay("Other Settings"), AssetReference(typeof(StreamingSettings), true), Tooltip("Reference to Streaming Settings asset")]
|
||||
public JsonAsset Streaming;
|
||||
|
||||
/// <summary>
|
||||
/// The custom settings to use with a game. Can be specified by the user to define game-specific options and be used by the external plugins (used as key-value pair).
|
||||
/// </summary>
|
||||
@@ -229,6 +235,8 @@ namespace FlaxEditor.Content.Settings
|
||||
return LoadAsset<LocalizationSettings>(gameSettings.Localization) as T;
|
||||
if (type == typeof(BuildSettings))
|
||||
return LoadAsset<BuildSettings>(gameSettings.GameCooking) as T;
|
||||
if (type == typeof(StreamingSettings))
|
||||
return LoadAsset<StreamingSettings>(gameSettings.Streaming) as T;
|
||||
if (type == typeof(InputSettings))
|
||||
return LoadAsset<InputSettings>(gameSettings.Input) as T;
|
||||
if (type == typeof(AudioSettings))
|
||||
@@ -333,6 +341,8 @@ namespace FlaxEditor.Content.Settings
|
||||
return SaveAsset(gameSettings, ref gameSettings.Localization, obj);
|
||||
if (type == typeof(BuildSettings))
|
||||
return SaveAsset(gameSettings, ref gameSettings.GameCooking, obj);
|
||||
if (type == typeof(StreamingSettings))
|
||||
return SaveAsset(gameSettings, ref gameSettings.Streaming, obj);
|
||||
if (type == typeof(InputSettings))
|
||||
return SaveAsset(gameSettings, ref gameSettings.Input, obj);
|
||||
if (type == typeof(WindowsPlatformSettings))
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
Guid Navigation;
|
||||
Guid Localization;
|
||||
Guid GameCooking;
|
||||
Guid Streaming;
|
||||
|
||||
// Per-platform settings containers
|
||||
Guid WindowsPlatform;
|
||||
|
||||
Reference in New Issue
Block a user