Merge branch 'master' into 1.5
This commit is contained in:
BIN
Content/Editor/Icons/Textures/AudioListner.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/AudioListner.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/AudioSource.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/AudioSource.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/Decal.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/Decal.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/DirectionalLight.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/DirectionalLight.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/EnvironmentProbe.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/EnvironmentProbe.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/ParticleEffect.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/ParticleEffect.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/PointLight.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/PointLight.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/SceneAnimationPlayer.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/SceneAnimationPlayer.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/SkyLight.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/SkyLight.flax
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Editor/Icons/Textures/Skybox.flax
(Stored with Git LFS)
BIN
Content/Editor/Icons/Textures/Skybox.flax
(Stored with Git LFS)
Binary file not shown.
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
class FLAXENGINE_API ObjectsRemovalService
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether object has been registered in the pool for the removing.
|
||||
/// </summary>
|
||||
|
||||
@@ -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<T>();
|
||||
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<T>();
|
||||
script.Parent = this;
|
||||
return script;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user