diff --git a/Content/Editor/Icons/Textures/AudioListner.flax b/Content/Editor/Icons/Textures/AudioListner.flax index 8c8c4920d..cafe7a63e 100644 --- a/Content/Editor/Icons/Textures/AudioListner.flax +++ b/Content/Editor/Icons/Textures/AudioListner.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6eeba8388149269d67ab06fd52eb8e8e1411f187393b6160f20750d565e12f32 -size 22576 +oid sha256:71244c864e5f1ca5232a5800ecb36379fad9bc75d3e0fb735a6105accf274fb0 +size 88362 diff --git a/Content/Editor/Icons/Textures/AudioSource.flax b/Content/Editor/Icons/Textures/AudioSource.flax index 059b900c8..a630a1052 100644 --- a/Content/Editor/Icons/Textures/AudioSource.flax +++ b/Content/Editor/Icons/Textures/AudioSource.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84afd860b8ebcaf166846220f275ea16bb69729ec5abfdf07fa9985e355539fe -size 22575 +oid sha256:0ba27db325a9d3c33f7b030b61730d03cca1727ed2477122a1a60de5578c1d22 +size 88361 diff --git a/Content/Editor/Icons/Textures/Decal.flax b/Content/Editor/Icons/Textures/Decal.flax index 73b661465..8e1028b54 100644 --- a/Content/Editor/Icons/Textures/Decal.flax +++ b/Content/Editor/Icons/Textures/Decal.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:22a3d53ddc4792fa4cf127da5d6a3e4d8a95757cb51fa04d7cb6b5abae2a643c -size 22569 +oid sha256:c6d258e04be1835c8164e93289bd496dd9b9bdb2cc9f7633db6b9929f08575ed +size 88355 diff --git a/Content/Editor/Icons/Textures/DirectionalLight.flax b/Content/Editor/Icons/Textures/DirectionalLight.flax index 1e4b650c4..6a26009d3 100644 --- a/Content/Editor/Icons/Textures/DirectionalLight.flax +++ b/Content/Editor/Icons/Textures/DirectionalLight.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d16e0df628d13c72aef9f214c9459536832b9c8c21293444a6fb0f75d40a411 -size 22251 +oid sha256:742bd2c5755db7672e8a1fe27f1db013ebe885f495956b4406226f25c0c49536 +size 88366 diff --git a/Content/Editor/Icons/Textures/EnvironmentProbe.flax b/Content/Editor/Icons/Textures/EnvironmentProbe.flax index dfd69645f..d3c6b136a 100644 --- a/Content/Editor/Icons/Textures/EnvironmentProbe.flax +++ b/Content/Editor/Icons/Textures/EnvironmentProbe.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2386df0b9a39ab819f166f5a48c0d859f2f3aaeb1c98451565446fd9f35f70c4 -size 22251 +oid sha256:d9c4e7a93cb5548253270063226452cedc6648edd95b0227a4146cee5013eae2 +size 88366 diff --git a/Content/Editor/Icons/Textures/ParticleEffect.flax b/Content/Editor/Icons/Textures/ParticleEffect.flax index fa4788651..7a6211e39 100644 --- a/Content/Editor/Icons/Textures/ParticleEffect.flax +++ b/Content/Editor/Icons/Textures/ParticleEffect.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eced258052ad7aad0abcdb1abc7a811087b9688688eb0923d01b62277111e319 -size 22633 +oid sha256:ad12b06bd7e64460f43442e8700d5f7862c1dd522e5e7335b21bd8fef1b7f1c1 +size 88364 diff --git a/Content/Editor/Icons/Textures/PointLight.flax b/Content/Editor/Icons/Textures/PointLight.flax index 5bc463f7c..caa8a09f6 100644 --- a/Content/Editor/Icons/Textures/PointLight.flax +++ b/Content/Editor/Icons/Textures/PointLight.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:205c29a130708367cfd920c02dad1ff5ce029bca2e4ba8b846ee924db6ed5ce8 -size 22245 +oid sha256:ccf4443326fc4efa30acce040684f620b1ec55b2e22081184b28abb7e4a5a45e +size 88360 diff --git a/Content/Editor/Icons/Textures/SceneAnimationPlayer.flax b/Content/Editor/Icons/Textures/SceneAnimationPlayer.flax index 498aa4a2c..2f20de087 100644 --- a/Content/Editor/Icons/Textures/SceneAnimationPlayer.flax +++ b/Content/Editor/Icons/Textures/SceneAnimationPlayer.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42a79e33f6237ff570ec799cf21859bde252280120a460d117a46c64e171f131 -size 22639 +oid sha256:419fd82bce8ffbb155ddcb5bd7387279571283555b212b374a18d95be88d5c62 +size 88370 diff --git a/Content/Editor/Icons/Textures/SkyLight.flax b/Content/Editor/Icons/Textures/SkyLight.flax index 9e557e37a..caa94f5b1 100644 --- a/Content/Editor/Icons/Textures/SkyLight.flax +++ b/Content/Editor/Icons/Textures/SkyLight.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:821d8878412cdaebf1472f7a8afc8f081dd4bf7818c3824d6d02d18c474e4355 -size 22243 +oid sha256:3c5d5f9ec5a3e9bff677b18b420ac8cc83aeeee778033471aa6677092c1e9f6d +size 88358 diff --git a/Content/Editor/Icons/Textures/Skybox.flax b/Content/Editor/Icons/Textures/Skybox.flax index c252d2fbf..ec3060c98 100644 --- a/Content/Editor/Icons/Textures/Skybox.flax +++ b/Content/Editor/Icons/Textures/Skybox.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54e8d8520f6d1e6dea5c4596309700358d97692fefbfea68ff76a058f4161e32 -size 22241 +oid sha256:2ebe5c47347d28484a4cbc0eca7f727bc93a3f9e90b781b72bc34bb44046fe75 +size 88356 diff --git a/Source/Editor/Utilities/ViewportIconsRenderer.cpp b/Source/Editor/Utilities/ViewportIconsRenderer.cpp index 8b8e0d74f..72533d6dc 100644 --- a/Source/Editor/Utilities/ViewportIconsRenderer.cpp +++ b/Source/Editor/Utilities/ViewportIconsRenderer.cpp @@ -29,6 +29,7 @@ enum class IconTypes DirectionalLight, EnvironmentProbe, Skybox, + SkyLight, AudioListener, AudioSource, Decal, @@ -155,6 +156,7 @@ bool ViewportIconsRendererService::Init() INIT(DirectionalLight, "Editor/Icons/DirectionalLight"); INIT(EnvironmentProbe, "Editor/Icons/EnvironmentProbe"); INIT(Skybox, "Editor/Icons/Skybox"); + INIT(SkyLight, "Editor/Icons/SkyLight"); INIT(AudioListener, "Editor/Icons/AudioListener"); INIT(AudioSource, "Editor/Icons/AudioSource"); INIT(Decal, "Editor/Icons/Decal"); @@ -173,7 +175,7 @@ bool ViewportIconsRendererService::Init() MAP_TYPE(SceneAnimationPlayer, SceneAnimationPlayer); MAP_TYPE(ExponentialHeightFog, Skybox); MAP_TYPE(Sky, Skybox); - MAP_TYPE(SkyLight, PointLight); + MAP_TYPE(SkyLight, SkyLight); MAP_TYPE(SpotLight, PointLight); #undef MAP_TYPE diff --git a/Source/Editor/Viewport/Previews/AnimatedModelPreview.cs b/Source/Editor/Viewport/Previews/AnimatedModelPreview.cs index fdd685439..f6fa47c61 100644 --- a/Source/Editor/Viewport/Previews/AnimatedModelPreview.cs +++ b/Source/Editor/Viewport/Previews/AnimatedModelPreview.cs @@ -198,6 +198,7 @@ namespace FlaxEditor.Viewport.Previews // Preview LOD { var previewLOD = ViewWidgetButtonMenu.AddButton("Preview LOD"); + previewLOD.CloseMenuOnClick = false; var previewLODValue = new IntValueBox(-1, 90, 2, 70.0f, -1, 10, 0.02f) { Parent = previewLOD diff --git a/Source/Editor/Viewport/Previews/ModelBasePreview.cs b/Source/Editor/Viewport/Previews/ModelBasePreview.cs index 445cc0250..388cf8a41 100644 --- a/Source/Editor/Viewport/Previews/ModelBasePreview.cs +++ b/Source/Editor/Viewport/Previews/ModelBasePreview.cs @@ -62,6 +62,7 @@ namespace FlaxEditor.Viewport.Previews // Preview LOD { var previewLOD = ViewWidgetButtonMenu.AddButton("Preview LOD"); + previewLOD.CloseMenuOnClick = false; var previewLODValue = new IntValueBox(-1, 90, 2, 70.0f, -1, 10, 0.02f) { Parent = previewLOD diff --git a/Source/Editor/Viewport/Previews/ModelPreview.cs b/Source/Editor/Viewport/Previews/ModelPreview.cs index 59dbbecb4..4b0439572 100644 --- a/Source/Editor/Viewport/Previews/ModelPreview.cs +++ b/Source/Editor/Viewport/Previews/ModelPreview.cs @@ -201,6 +201,7 @@ namespace FlaxEditor.Viewport.Previews // Preview LOD { var previewLOD = ViewWidgetButtonMenu.AddButton("Preview LOD"); + previewLOD.CloseMenuOnClick = false; var previewLODValue = new IntValueBox(-1, 90, 2, 70.0f, -1, 10, 0.02f) { Parent = previewLOD diff --git a/Source/Editor/Viewport/Previews/ParticleEmitterPreview.cs b/Source/Editor/Viewport/Previews/ParticleEmitterPreview.cs index c1289509e..e59016856 100644 --- a/Source/Editor/Viewport/Previews/ParticleEmitterPreview.cs +++ b/Source/Editor/Viewport/Previews/ParticleEmitterPreview.cs @@ -67,6 +67,7 @@ namespace FlaxEditor.Viewport.Previews if (useWidgets) { var playbackDuration = ViewWidgetButtonMenu.AddButton("Duration"); + playbackDuration.CloseMenuOnClick = false; var playbackDurationValue = new FloatValueBox(_playbackDuration, 90, 2, 70.0f, 0.1f, 1000000.0f, 0.1f) { Parent = playbackDuration diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index 5ae63dbce..c2470f39a 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -203,6 +203,7 @@ namespace FlaxEditor.Windows showFileExtensionsButton.AutoCheck = true; var viewScale = menu.AddButton("View Scale"); + viewScale.CloseMenuOnClick = false; var scaleValue = new FloatValueBox(1, 75, 2, 50.0f, 0.3f, 3.0f, 0.01f) { Parent = viewScale diff --git a/Source/Editor/Windows/GameWindow.cs b/Source/Editor/Windows/GameWindow.cs index 23558c396..c800692f7 100644 --- a/Source/Editor/Windows/GameWindow.cs +++ b/Source/Editor/Windows/GameWindow.cs @@ -353,6 +353,7 @@ namespace FlaxEditor.Windows // Viewport Brightness { var brightness = menu.AddButton("Viewport Brightness"); + brightness.CloseMenuOnClick = false; var brightnessValue = new FloatValueBox(_viewport.Brightness, 140, 2, 50.0f, 0.001f, 10.0f, 0.001f) { Parent = brightness @@ -363,6 +364,7 @@ namespace FlaxEditor.Windows // Viewport Resolution { var resolution = menu.AddButton("Viewport Resolution"); + resolution.CloseMenuOnClick = false; var resolutionValue = new FloatValueBox(_viewport.ResolutionScale, 140, 2, 50.0f, 0.1f, 4.0f, 0.001f) { Parent = resolution @@ -381,6 +383,7 @@ namespace FlaxEditor.Windows // Show GUI { var button = menu.AddButton("Show GUI"); + button.CloseMenuOnClick = false; var checkbox = new CheckBox(140, 2, ShowGUI) { Parent = button }; checkbox.StateChanged += x => ShowGUI = x.Checked; } @@ -388,6 +391,7 @@ namespace FlaxEditor.Windows // Show Debug Draw { var button = menu.AddButton("Show Debug Draw"); + button.CloseMenuOnClick = false; var checkbox = new CheckBox(140, 2, ShowDebugDraw) { Parent = button }; checkbox.StateChanged += x => ShowDebugDraw = x.Checked; } diff --git a/Source/Engine/Core/ObjectsRemovalService.cpp b/Source/Engine/Core/ObjectsRemovalService.cpp index f3ef498ef..7d79a9523 100644 --- a/Source/Engine/Core/ObjectsRemovalService.cpp +++ b/Source/Engine/Core/ObjectsRemovalService.cpp @@ -22,11 +22,10 @@ namespace ObjectsRemovalServiceImpl using namespace ObjectsRemovalServiceImpl; -class ObjectsRemovalServiceService : public EngineService +class ObjectsRemoval : public EngineService { public: - - ObjectsRemovalServiceService() + ObjectsRemoval() : EngineService(TEXT("Objects Removal Service"), -1000) { } @@ -36,7 +35,7 @@ public: void Dispose() override; }; -ObjectsRemovalServiceService ObjectsRemovalServiceServiceInstance; +ObjectsRemoval ObjectsRemovalInstance; bool ObjectsRemovalService::IsInPool(Object* obj) { @@ -63,7 +62,6 @@ bool ObjectsRemovalService::HasNewItemsForFlush() NewItemsLocker.Lock(); const bool result = NewItemsPool.HasItems(); NewItemsLocker.Unlock(); - return result; } @@ -95,6 +93,8 @@ void ObjectsRemovalService::Add(Object* obj, float timeToLive, bool useGameTime) void ObjectsRemovalService::Flush(float dt, float gameDelta) { + PROFILE_CPU(); + // Add new items { ScopeLock lock(NewItemsLocker); @@ -173,14 +173,14 @@ void ObjectsRemovalService::Flush(float dt, float gameDelta) } } -bool ObjectsRemovalServiceService::Init() +bool ObjectsRemoval::Init() { LastUpdate = DateTime::NowUTC(); LastUpdateGameTime = 0; return false; } -void ObjectsRemovalServiceService::LateUpdate() +void ObjectsRemoval::LateUpdate() { PROFILE_CPU(); @@ -194,7 +194,7 @@ void ObjectsRemovalServiceService::LateUpdate() LastUpdate = now; } -void ObjectsRemovalServiceService::Dispose() +void ObjectsRemoval::Dispose() { // Collect new objects ObjectsRemovalService::Flush(); diff --git a/Source/Engine/Core/ObjectsRemovalService.h b/Source/Engine/Core/ObjectsRemovalService.h index 92a5bd1af..e9120a6dd 100644 --- a/Source/Engine/Core/ObjectsRemovalService.h +++ b/Source/Engine/Core/ObjectsRemovalService.h @@ -10,7 +10,6 @@ class FLAXENGINE_API ObjectsRemovalService { public: - /// /// Determines whether object has been registered in the pool for the removing. /// diff --git a/Source/Engine/Level/Actor.cs b/Source/Engine/Level/Actor.cs index cd774fca6..76e95810f 100644 --- a/Source/Engine/Level/Actor.cs +++ b/Source/Engine/Level/Actor.cs @@ -125,7 +125,7 @@ namespace FlaxEngine { if (type.IsAbstract) return null; - + var result = (Actor)New(type); result.SetParent(this, false, false); return result; @@ -180,7 +180,7 @@ namespace FlaxEngine { if (typeof(T).IsAbstract) return null; - + result = New(); result.SetParent(this, false, false); } @@ -196,7 +196,7 @@ namespace FlaxEngine { if (type.IsAbstract) return null; - + var script = (Script)New(type); script.Parent = this; return script; @@ -211,7 +211,7 @@ namespace FlaxEngine { if (typeof(T).IsAbstract) return null; - + var script = New(); script.Parent = this; return script; diff --git a/Source/Engine/Threading/ThreadRegistry.cpp b/Source/Engine/Threading/ThreadRegistry.cpp index b6844e13f..3dafb4f87 100644 --- a/Source/Engine/Threading/ThreadRegistry.cpp +++ b/Source/Engine/Threading/ThreadRegistry.cpp @@ -47,7 +47,6 @@ void ThreadRegistry::KillEmAll() void ThreadRegistry::Add(Thread* thread) { ASSERT(thread && thread->GetID() != 0); - Locker.Lock(); ASSERT(!Registry.ContainsKey(thread->GetID()) && !Registry.ContainsValue(thread)); Registry.Add(thread->GetID(), thread); @@ -57,9 +56,11 @@ void ThreadRegistry::Add(Thread* thread) void ThreadRegistry::Remove(Thread* thread) { ASSERT(thread && thread->GetID() != 0); - Locker.Lock(); - ASSERT_LOW_LAYER(Registry.ContainsKey(thread->GetID()) && Registry[thread->GetID()] == thread); +#if ENABLE_ASSERTION_LOW_LAYERS + Thread** currentValue = Registry.TryGet(thread->GetID()); + ASSERT_LOW_LAYER(!currentValue || *currentValue == thread); +#endif Registry.Remove(thread->GetID()); Locker.Unlock(); }