Refactor settings types to use scripting API
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The Android platform settings asset archetype. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public class AndroidPlatformSettings : SettingsBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The application package name (eg. com.company.product). Custom tokens: ${PROJECT_NAME}, ${COMPANY_NAME}.
|
||||
/// </summary>
|
||||
[EditorOrder(0), EditorDisplay("General"), Tooltip("The application package name (eg. com.company.product). Custom tokens: ${PROJECT_NAME}, ${COMPANY_NAME}.")]
|
||||
public string PackageName = "com.${COMPANY_NAME}.${PROJECT_NAME}";
|
||||
|
||||
/// <summary>
|
||||
/// The application permissions list (eg. android.media.action.IMAGE_CAPTURE). Added to the generated manifest file.
|
||||
/// </summary>
|
||||
[EditorOrder(100), EditorDisplay("General"), Tooltip("The application permissions list (eg. android.media.action.IMAGE_CAPTURE). Added to the generated manifest file.")]
|
||||
public string[] Permissions;
|
||||
|
||||
/// <summary>
|
||||
/// Custom icon texture to use for the application (overrides the default one).
|
||||
/// </summary>
|
||||
[EditorOrder(1030), EditorDisplay("Other"), Tooltip("Custom icon texture to use for the application (overrides the default one).")]
|
||||
public Texture OverrideIcon;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System.ComponentModel;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The audio payback engine settings container. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public sealed class AudioSettings : SettingsBase
|
||||
{
|
||||
/// <summary>
|
||||
/// If checked, audio playback will be disabled in build game. Can be used if game uses custom audio playback engine.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(0), EditorDisplay("General"), Tooltip("If checked, audio playback will be disabled in build game. Can be used if game uses custom audio playback engine.")]
|
||||
public bool DisableAudio;
|
||||
|
||||
/// <summary>
|
||||
/// The doppler doppler effect factor. Scale for source and listener velocities. Default is 1.
|
||||
/// </summary>
|
||||
[DefaultValue(1.0f)]
|
||||
[EditorOrder(100), EditorDisplay("General"), Limit(0, 10.0f, 0.01f), Tooltip("The doppler doppler effect factor. Scale for source and listener velocities. Default is 1.")]
|
||||
public float DopplerFactor = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// True if mute all audio playback when game has no use focus.
|
||||
/// </summary>
|
||||
[DefaultValue(true)]
|
||||
[EditorOrder(200), EditorDisplay("General", "Mute On Focus Loss"), Tooltip("If checked, engine will mute all audio playback when game has no use focus.")]
|
||||
public bool MuteOnFocusLoss = true;
|
||||
}
|
||||
}
|
||||
@@ -1,77 +1,12 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The game building settings container. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public sealed class BuildSettings : SettingsBase
|
||||
partial class BuildSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum amount of assets to include into a single assets package. Assets will be split into several packages if need to.
|
||||
/// </summary>
|
||||
[DefaultValue(4096)]
|
||||
[EditorOrder(10), Limit(32, short.MaxValue), EditorDisplay("General", "Max assets per package"), Tooltip("The maximum amount of assets to include into a single assets package. Assets will be split into several packages if need to.")]
|
||||
public int MaxAssetsPerPackage = 4096;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum size of the single assets package (in megabytes). Assets will be split into several packages if need to.
|
||||
/// </summary>
|
||||
[DefaultValue(1024)]
|
||||
[EditorOrder(20), Limit(16, short.MaxValue), EditorDisplay("General", "Max package size (in MB)"), Tooltip("The maximum size of the single assets package (in megabytes). Assets will be split into several packages if need to.")]
|
||||
public int MaxPackageSizeMB = 1024;
|
||||
|
||||
/// <summary>
|
||||
/// The game content cooking Keys. Use the same value for a game and DLC packages to support loading them by the build game. Use 0 to randomize it during building.
|
||||
/// </summary>
|
||||
[DefaultValue(0)]
|
||||
[EditorOrder(30), EditorDisplay("General"), Tooltip("The game content cooking Keys. Use the same value for a game and DLC packages to support loading them by the build game. Use 0 to randomize it during building.")]
|
||||
public int ContentKey = 0;
|
||||
|
||||
/// <summary>
|
||||
/// If checked, the builds produced by the Game Cooker will be treated as for final game distribution (eg. for game store upload). Builds done this way cannot be tested on console devkits (eg. Xbox One, Xbox Scarlett).
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(40), EditorDisplay("General"), Tooltip("If checked, the builds produced by the Game Cooker will be treated as for final game distribution (eg. for game store upload). Builds done this way cannot be tested on console devkits (eg. Xbox One, Xbox Scarlett).")]
|
||||
public bool ForDistribution;
|
||||
|
||||
/// <summary>
|
||||
/// If checked, the output build files won't be packaged for the destination platform. Useful when debugging build from local PC.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(50), EditorDisplay("General"), Tooltip("If checked, the output build files won't be packaged for the destination platform. Useful when debugging build from local PC.")]
|
||||
public bool SkipPackaging;
|
||||
|
||||
/// <summary>
|
||||
/// The additional assets to include into build (into root assets set).
|
||||
/// </summary>
|
||||
[EditorOrder(1000), EditorDisplay("Additional Data"), Tooltip("The additional assets to include into build (into root assets set).")]
|
||||
public Asset[] AdditionalAssets;
|
||||
|
||||
/// <summary>
|
||||
/// The additional folders with assets to include into build (into root assets set). List of paths relative to the project directory (or absolute).
|
||||
/// </summary>
|
||||
[EditorOrder(1010), EditorDisplay("Additional Data"), Tooltip("The additional folders with assets to include into build (to root assets set). List of paths relative to the project directory (or absolute).")]
|
||||
public string[] AdditionalAssetFolders;
|
||||
|
||||
/// <summary>
|
||||
/// Disables shaders compiler optimizations in cooked game. Can be used to debug shaders on a target platform or to speed up the shaders compilation time.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(2000), EditorDisplay("Content", "Shaders No Optimize"), Tooltip("Disables shaders compiler optimizations in cooked game. Can be used to debug shaders on a target platform or to speed up the shaders compilation time.")]
|
||||
public bool ShadersNoOptimize;
|
||||
|
||||
/// <summary>
|
||||
/// Enables shader debug data generation for shaders in cooked game (depends on the target platform rendering backend).
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(2010), EditorDisplay("Content"), Tooltip("Enables shader debug data generation for shaders in cooked game (depends on the target platform rendering backend).")]
|
||||
public bool ShadersGenerateDebugData;
|
||||
|
||||
/// <summary>
|
||||
/// The build presets.
|
||||
/// </summary>
|
||||
|
||||
@@ -7,32 +7,11 @@ using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The game settings asset archetype. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public sealed class GameSettings : SettingsBase
|
||||
partial class GameSettings
|
||||
{
|
||||
internal const string PS4PlatformSettingsTypename = "FlaxEditor.Content.Settings.PS4PlatformSettings";
|
||||
internal const string XboxScarlettPlatformSettingsTypename = "FlaxEditor.Content.Settings.XboxScarlettPlatformSettings";
|
||||
|
||||
/// <summary>
|
||||
/// The product full name.
|
||||
/// </summary>
|
||||
[EditorOrder(0), EditorDisplay("General"), Tooltip("The name of your product.")]
|
||||
public string ProductName;
|
||||
|
||||
/// <summary>
|
||||
/// The company full name.
|
||||
/// </summary>
|
||||
[EditorOrder(10), EditorDisplay("General"), Tooltip("The name of your company or organization.")]
|
||||
public string CompanyName;
|
||||
|
||||
/// <summary>
|
||||
/// The copyright note used for content signing (eg. source code header).
|
||||
/// </summary>
|
||||
[EditorOrder(15), EditorDisplay("General"), Tooltip("The copyright note used for content signing (eg. source code header).")]
|
||||
public string CopyrightNotice;
|
||||
|
||||
/// <summary>
|
||||
/// The default application icon.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The graphics rendering settings container. Allows to edit asset via editor. To modify those settings at runtime use <see cref="GraphicsSettings"/>.
|
||||
/// </summary>
|
||||
/// <seealso cref="FlaxEngine.Graphics"/>
|
||||
public sealed class GraphicsSettings : SettingsBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Enables rendering synchronization with the refresh rate of the display device to avoid "tearing" artifacts.
|
||||
/// </summary>
|
||||
[EditorOrder(20), EditorDisplay("General", "Use V-Sync"), Tooltip("Enables rendering synchronization with the refresh rate of the display device to avoid \"tearing\" artifacts.")]
|
||||
public bool UseVSync = false;
|
||||
|
||||
/// <summary>
|
||||
/// Anti Aliasing quality setting.
|
||||
/// </summary>
|
||||
[EditorOrder(1000), EditorDisplay("Quality", "AA Quality"), Tooltip("Anti Aliasing quality.")]
|
||||
public Quality AAQuality = Quality.Medium;
|
||||
|
||||
/// <summary>
|
||||
/// Screen Space Reflections quality.
|
||||
/// </summary>
|
||||
[EditorOrder(1100), EditorDisplay("Quality", "SSR Quality"), Tooltip("Screen Space Reflections quality.")]
|
||||
public Quality SSRQuality = Quality.Medium;
|
||||
|
||||
/// <summary>
|
||||
/// Screen Space Ambient Occlusion quality setting.
|
||||
/// </summary>
|
||||
[EditorOrder(1200), EditorDisplay("Quality", "SSAO Quality"), Tooltip("Screen Space Ambient Occlusion quality setting.")]
|
||||
public Quality SSAOQuality = Quality.Medium;
|
||||
|
||||
/// <summary>
|
||||
/// Volumetric Fog quality setting.
|
||||
/// </summary>
|
||||
[EditorOrder(1250), EditorDisplay("Quality", "Volumetric Fog Quality"), Tooltip("Volumetric Fog quality setting.")]
|
||||
public Quality VolumetricFogQuality = Quality.High;
|
||||
|
||||
/// <summary>
|
||||
/// The shadows quality.
|
||||
/// </summary>
|
||||
[EditorOrder(1300), EditorDisplay("Quality", "Shadows Quality"), Tooltip("The shadows quality.")]
|
||||
public Quality ShadowsQuality = Quality.Medium;
|
||||
|
||||
/// <summary>
|
||||
/// The shadow maps quality (textures resolution).
|
||||
/// </summary>
|
||||
[EditorOrder(1310), EditorDisplay("Quality", "Shadow Maps Quality"), Tooltip("The shadow maps quality (textures resolution).")]
|
||||
public Quality ShadowMapsQuality = Quality.Medium;
|
||||
|
||||
/// <summary>
|
||||
/// Enables cascades splits blending for directional light shadows.
|
||||
/// </summary>
|
||||
[EditorOrder(1320), EditorDisplay("Quality", "Allow CSM Blending"), Tooltip("Enables cascades splits blending for directional light shadows.")]
|
||||
public bool AllowCSMBlending = false;
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,7 @@ using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The input settings container. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public sealed class InputSettings : SettingsBase
|
||||
partial class InputSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Maps a discrete button or key press events to a "friendly name" that will later be bound to event-driven behavior. The end effect is that pressing (and/or releasing) a key, mouse button, or keypad button.
|
||||
|
||||
@@ -6,10 +6,7 @@ using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The layers and objects tags settings. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public sealed class LayersAndTagsSettings : SettingsBase
|
||||
partial class LayersAndTagsSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// The tag names.
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The Linux platform settings asset archetype. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public class LinuxPlatformSettings : SettingsBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The default game window mode.
|
||||
/// </summary>
|
||||
[EditorOrder(10), EditorDisplay("Window"), Tooltip("The default game window mode.")]
|
||||
public GameWindowMode WindowMode = GameWindowMode.Windowed;
|
||||
|
||||
/// <summary>
|
||||
/// The default game window width (in pixels).
|
||||
/// </summary>
|
||||
[EditorOrder(20), EditorDisplay("Window"), Tooltip("The default game window width (in pixels).")]
|
||||
public int ScreenWidth = 1280;
|
||||
|
||||
/// <summary>
|
||||
/// The default game window height (in pixels).
|
||||
/// </summary>
|
||||
[EditorOrder(30), EditorDisplay("Window"), Tooltip("The default game window height (in pixels).")]
|
||||
public int ScreenHeight = 720;
|
||||
|
||||
/// <summary>
|
||||
/// Enables resizing the game window by the user.
|
||||
/// </summary>
|
||||
[EditorOrder(40), EditorDisplay("Window"), Tooltip("Enables resizing the game window by the user.")]
|
||||
public bool ResizableWindow = false;
|
||||
|
||||
/// <summary>
|
||||
/// Enables game running when application window loses focus.
|
||||
/// </summary>
|
||||
[EditorOrder(1010), EditorDisplay("Other", "Run In Background"), Tooltip("Enables game running when application window loses focus.")]
|
||||
public bool RunInBackground = false;
|
||||
|
||||
/// <summary>
|
||||
/// Limits maximum amount of concurrent game instances running to one, otherwise user may launch application more than once.
|
||||
/// </summary>
|
||||
[EditorOrder(1020), EditorDisplay("Other"), Tooltip("Limits maximum amount of concurrent game instances running to one, otherwise user may launch application more than once.")]
|
||||
public bool ForceSingleInstance = false;
|
||||
|
||||
/// <summary>
|
||||
/// Custom icon texture to use for the application (overrides the default one).
|
||||
/// </summary>
|
||||
[EditorOrder(1030), EditorDisplay("Other"), Tooltip("Custom icon texture to use for the application (overrides the default one).")]
|
||||
public Texture OverrideIcon;
|
||||
|
||||
/// <summary>
|
||||
/// Enables support for Vulkan. Disabling it reduces compiled shaders count.
|
||||
/// </summary>
|
||||
[EditorOrder(2020), EditorDisplay("Graphics", "Support Vulkan"), Tooltip("Enables support for Vulkan. Disabling it reduces compiled shaders count.")]
|
||||
public bool SupportVulkan = true;
|
||||
}
|
||||
}
|
||||
@@ -1,112 +1,17 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System.ComponentModel;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The physics simulation settings container. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public sealed class PhysicsSettings : SettingsBase
|
||||
partial class PhysicsSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// The default gravity force value (in cm^2/s).
|
||||
/// </summary>
|
||||
[DefaultValue(typeof(Vector3), "0,-981.0,0")]
|
||||
[EditorOrder(0), EditorDisplay("Simulation"), Tooltip("The default gravity force value (in cm^2/s).")]
|
||||
public Vector3 DefaultGravity = new Vector3(0, -981.0f, 0);
|
||||
|
||||
/// <summary>
|
||||
/// If enabled, any Raycast or other scene query that intersects with a Collider marked as a Trigger will returns with a hit. Individual raycasts can override this behavior.
|
||||
/// </summary>
|
||||
[DefaultValue(true)]
|
||||
[EditorOrder(10), EditorDisplay("Simulation"), Tooltip("If enabled, any Raycast or other scene query that intersects with a Collider marked as a Trigger will returns with a hit. Individual raycasts can override this behavior.")]
|
||||
public bool QueriesHitTriggers = true;
|
||||
|
||||
/// <summary>
|
||||
/// Triangles from triangle meshes (CSG) with an area less than or equal to this value will be removed from physics collision data. Set to less than or equal 0 to disable.
|
||||
/// </summary>
|
||||
[DefaultValue(5.0f)]
|
||||
[EditorOrder(20), EditorDisplay("Simulation"), Limit(-1, 10), Tooltip("Triangles from triangle meshes (CSG) with an area less than or equal to this value will be removed from physics collision data. Set to less than or equal 0 to disable.")]
|
||||
public float TriangleMeshTriangleMinAreaThreshold = 5.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum relative velocity required for an object to bounce. A typical value for simulation stability is about 0.2 * gravity
|
||||
/// </summary>
|
||||
[DefaultValue(200.0f)]
|
||||
[EditorOrder(30), EditorDisplay("Simulation"), Limit(0), Tooltip("Minimum relative velocity required for an object to bounce. A typical value for simulation stability is about 0.2 * gravity")]
|
||||
public float BounceThresholdVelocity = 200.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Default friction combine mode, controls how friction is computed for multiple materials.
|
||||
/// </summary>
|
||||
[DefaultValue(PhysicsCombineMode.Average)]
|
||||
[EditorOrder(40), EditorDisplay("Simulation"), Tooltip("Default friction combine mode, controls how friction is computed for multiple materials.")]
|
||||
public PhysicsCombineMode FrictionCombineMode = PhysicsCombineMode.Average;
|
||||
|
||||
/// <summary>
|
||||
/// Default restitution combine mode, controls how restitution is computed for multiple materials.
|
||||
/// </summary>
|
||||
[DefaultValue(PhysicsCombineMode.Average)]
|
||||
[EditorOrder(50), EditorDisplay("Simulation"), Tooltip("Default restitution combine mode, controls how restitution is computed for multiple materials.")]
|
||||
public PhysicsCombineMode RestitutionCombineMode = PhysicsCombineMode.Average;
|
||||
|
||||
/// <summary>
|
||||
/// If true CCD will be ignored. This is an optimization when CCD is never used which removes the need for PhysX to check it internally.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(70), EditorDisplay("Simulation", "Disable CCD"), Tooltip("If true CCD will be ignored. This is an optimization when CCD is never used which removes the need for PhysX to check it internally.")]
|
||||
public bool DisableCCD;
|
||||
|
||||
/// <summary>
|
||||
/// Enables adaptive forces to accelerate convergence of the solver. Can improve physics simulation performance but lead to artifacts.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(80), EditorDisplay("Simulation"), Tooltip("Enables adaptive forces to accelerate convergence of the solver. Can improve physics simulation performance but lead to artifacts.")]
|
||||
public bool EnableAdaptiveForce;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum allowed delta time (in seconds) for the physics simulation step.
|
||||
/// </summary>
|
||||
[DefaultValue(1.0f / 10.0f)]
|
||||
[EditorOrder(1000), EditorDisplay("Framerate"), Limit(0.0013f, 2.0f), Tooltip("The maximum allowed delta time (in seconds) for the physics simulation step.")]
|
||||
public float MaxDeltaTime = 1.0f / 10.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to substep the physics simulation.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(1005), EditorDisplay("Framerate"), Tooltip("Whether to substep the physics simulation.")]
|
||||
public bool EnableSubstepping;
|
||||
|
||||
/// <summary>
|
||||
/// Delta time (in seconds) for an individual simulation substep.
|
||||
/// </summary>
|
||||
[DefaultValue(1.0f / 120.0f)]
|
||||
[EditorOrder(1010), EditorDisplay("Framerate"), Limit(0.0013f, 1.0f), Tooltip("Delta time (in seconds) for an individual simulation substep.")]
|
||||
public float SubstepDeltaTime = 1.0f / 120.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of substeps for physics simulation.
|
||||
/// </summary>
|
||||
[DefaultValue(5)]
|
||||
[EditorOrder(1020), EditorDisplay("Framerate"), Limit(1, 16), Tooltip("The maximum number of substeps for physics simulation.")]
|
||||
public int MaxSubsteps = 5;
|
||||
|
||||
/// <summary>
|
||||
/// The collision layers masks. Used to define layer-based collision detection.
|
||||
/// </summary>
|
||||
[EditorOrder(1040), EditorDisplay("Layers Matrix"), CustomEditor(typeof(FlaxEditor.CustomEditors.Dedicated.LayersMatrixEditor))]
|
||||
public uint[] LayerMasks = new uint[32];
|
||||
|
||||
/// <summary>
|
||||
/// Enables support for cooking physical collision shapes geometry at runtime. Use it to enable generating runtime terrain collision or convex mesh colliders.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(1100), EditorDisplay("Other", "Support Cooking At Runtime"), Tooltip("Enables support for cooking physical collision shapes geometry at runtime. Use it to enable generating runtime terrain collision or convex mesh colliders.")]
|
||||
public bool SupportCookingAtRuntime;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PhysicsSettings"/> class.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System.ComponentModel;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The time settings asset archetype. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public sealed class TimeSettings : SettingsBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The target amount of the game logic updates per second (script updates frequency). Use 0 for infinity.
|
||||
/// </summary>
|
||||
[DefaultValue(30.0f)]
|
||||
[EditorOrder(1), Limit(0, 1000), EditorDisplay(null, "Update FPS"), Tooltip("Target amount of the game logic updates per second (script updates frequency). Use 0 for infinity.")]
|
||||
public float UpdateFPS = 30.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The target amount of the physics simulation updates per second (also fixed updates frequency). Use 0 for infinity.
|
||||
/// </summary>
|
||||
[DefaultValue(60.0f)]
|
||||
[EditorOrder(2), Limit(0, 1000), EditorDisplay(null, "Physics FPS"), Tooltip("Target amount of the physics simulation updates per second (also fixed updates frequency). Use 0 for infinity.")]
|
||||
public float PhysicsFPS = 60.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The target amount of the frames rendered per second (actual game FPS). Use 0 for infinity.
|
||||
/// </summary>
|
||||
[DefaultValue(60.0f)]
|
||||
[EditorOrder(3), Limit(0, 1000), EditorDisplay(null, "Draw FPS"), Tooltip("Target amount of the frames rendered per second (actual game FPS). Use 0 for infinity.")]
|
||||
public float DrawFPS = 60.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The game time scale factor. Default is 1.
|
||||
/// </summary>
|
||||
[DefaultValue(1.0f)]
|
||||
[EditorOrder(10), Limit(0, 1000.0f, 0.1f), Tooltip("Game time scaling factor. Default is 1 for real-time simulation.")]
|
||||
public float TimeScale = 1.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum allowed delta time (in seconds) for the game logic update step.
|
||||
/// </summary>
|
||||
[DefaultValue(1.0f / 10.0f)]
|
||||
[EditorOrder(20), Limit(0.1f, 1000.0f, 0.01f), Tooltip("The maximum allowed delta time (in seconds) for the game logic update step.")]
|
||||
public float MaxUpdateDeltaTime = 1.0f / 10.0f;
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The Universal Windows Platform (UWP) platform settings asset archetype. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public class UWPPlatformSettings : SettingsBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The preferred launch windowing mode.
|
||||
/// </summary>
|
||||
public enum WindowMode
|
||||
{
|
||||
/// <summary>
|
||||
/// The full screen mode
|
||||
/// </summary>
|
||||
FullScreen = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The view size.
|
||||
/// </summary>
|
||||
ViewSize = 1,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The display orientation modes. Can be combined as flags.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum DisplayOrientations
|
||||
{
|
||||
/// <summary>
|
||||
/// The none.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The landscape.
|
||||
/// </summary>
|
||||
Landscape = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The landscape flipped.
|
||||
/// </summary>
|
||||
LandscapeFlipped = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The portrait.
|
||||
/// </summary>
|
||||
Portrait = 4,
|
||||
|
||||
/// <summary>
|
||||
/// The portrait flipped.
|
||||
/// </summary>
|
||||
PortraitFlipped = 8,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The preferred launch windowing mode. Always fullscreen on Xbox.
|
||||
/// </summary>
|
||||
[DefaultValue(WindowMode.FullScreen)]
|
||||
[EditorOrder(10), EditorDisplay("Window"), Tooltip("The preferred launch windowing mode. Always fullscreen on Xbox.")]
|
||||
public WindowMode PreferredLaunchWindowingMode = WindowMode.FullScreen;
|
||||
|
||||
/// <summary>
|
||||
/// The display orientation modes. Can be combined as flags.
|
||||
/// </summary>
|
||||
[DefaultValue(DisplayOrientations.Landscape | DisplayOrientations.LandscapeFlipped | DisplayOrientations.Portrait | DisplayOrientations.PortraitFlipped)]
|
||||
[EditorOrder(20), EditorDisplay("Window"), Tooltip("The display orientation modes. Can be combined as flags.")]
|
||||
public DisplayOrientations AutoRotationPreferences = DisplayOrientations.Landscape | DisplayOrientations.LandscapeFlipped | DisplayOrientations.Portrait | DisplayOrientations.PortraitFlipped;
|
||||
|
||||
/// <summary>
|
||||
/// The location of the package certificate (relative to the project).
|
||||
/// </summary>
|
||||
[DefaultValue("")]
|
||||
[EditorOrder(1010), EditorDisplay("Other"), Tooltip("The location of the package certificate (relative to the project).")]
|
||||
public string CertificateLocation = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Enables support for DirectX 11. Disabling it reduces compiled shaders count.
|
||||
/// </summary>
|
||||
[DefaultValue(true)]
|
||||
[EditorOrder(2000), EditorDisplay("Graphics", "Support DirectX 11"), Tooltip("Enables support for DirectX 11. Disabling it reduces compiled shaders count.")]
|
||||
public bool SupportDX11 = true;
|
||||
|
||||
/// <summary>
|
||||
/// Enables support for DirectX 10 and DirectX 10.1. Disabling it reduces compiled shaders count.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(2010), EditorDisplay("Graphics", "Support DirectX 10"), Tooltip("Enables support for DirectX 10 and DirectX 10.1. Disabling it reduces compiled shaders count.")]
|
||||
public bool SupportDX10 = false;
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System.ComponentModel;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace FlaxEditor.Content.Settings
|
||||
{
|
||||
/// <summary>
|
||||
/// The Windows platform settings asset archetype. Allows to edit asset via editor.
|
||||
/// </summary>
|
||||
public class WindowsPlatformSettings : SettingsBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The default game window mode.
|
||||
/// </summary>
|
||||
[DefaultValue(GameWindowMode.Windowed)]
|
||||
[EditorOrder(10), EditorDisplay("Window"), Tooltip("The default game window mode.")]
|
||||
public GameWindowMode WindowMode = GameWindowMode.Windowed;
|
||||
|
||||
/// <summary>
|
||||
/// The default game window width (in pixels).
|
||||
/// </summary>
|
||||
[DefaultValue(1280)]
|
||||
[EditorOrder(20), EditorDisplay("Window"), Tooltip("The default game window width (in pixels).")]
|
||||
public int ScreenWidth = 1280;
|
||||
|
||||
/// <summary>
|
||||
/// The default game window height (in pixels).
|
||||
/// </summary>
|
||||
[DefaultValue(720)]
|
||||
[EditorOrder(30), EditorDisplay("Window"), Tooltip("The default game window height (in pixels).")]
|
||||
public int ScreenHeight = 720;
|
||||
|
||||
/// <summary>
|
||||
/// Enables resizing the game window by the user.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(40), EditorDisplay("Window"), Tooltip("Enables resizing the game window by the user.")]
|
||||
public bool ResizableWindow = false;
|
||||
|
||||
/// <summary>
|
||||
/// Enables game running when application window loses focus.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(1010), EditorDisplay("Other", "Run In Background"), Tooltip("Enables game running when application window loses focus.")]
|
||||
public bool RunInBackground = false;
|
||||
|
||||
/// <summary>
|
||||
/// Limits maximum amount of concurrent game instances running to one, otherwise user may launch application more than once.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(1020), EditorDisplay("Other"), Tooltip("Limits maximum amount of concurrent game instances running to one, otherwise user may launch application more than once.")]
|
||||
public bool ForceSingleInstance = false;
|
||||
|
||||
/// <summary>
|
||||
/// Custom icon texture to use for the application (overrides the default one).
|
||||
/// </summary>
|
||||
[DefaultValue(null)]
|
||||
[EditorOrder(1030), EditorDisplay("Other"), Tooltip("Custom icon texture to use for the application (overrides the default one).")]
|
||||
public Texture OverrideIcon;
|
||||
|
||||
/// <summary>
|
||||
/// Enables support for DirectX 12. Disabling it reduces compiled shaders count.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(2000), EditorDisplay("Graphics", "Support DirectX 12"), Tooltip("Enables support for DirectX 12. Disabling it reduces compiled shaders count.")]
|
||||
public bool SupportDX12 = false;
|
||||
|
||||
/// <summary>
|
||||
/// Enables support for DirectX 11. Disabling it reduces compiled shaders count.
|
||||
/// </summary>
|
||||
[DefaultValue(true)]
|
||||
[EditorOrder(2010), EditorDisplay("Graphics", "Support DirectX 11"), Tooltip("Enables support for DirectX 11. Disabling it reduces compiled shaders count.")]
|
||||
public bool SupportDX11 = true;
|
||||
|
||||
/// <summary>
|
||||
/// Enables support for DirectX 10 and DirectX 10.1. Disabling it reduces compiled shaders count.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(2020), EditorDisplay("Graphics", "Support DirectX 10"), Tooltip("Enables support for DirectX 10 and DirectX 10.1. Disabling it reduces compiled shaders count.")]
|
||||
public bool SupportDX10 = false;
|
||||
|
||||
/// <summary>
|
||||
/// Enables support for Vulkan. Disabling it reduces compiled shaders count.
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[EditorOrder(2030), EditorDisplay("Graphics", "Support Vulkan"), Tooltip("Enables support for Vulkan. Disabling it reduces compiled shaders count.")]
|
||||
public bool SupportVulkan = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user