diff --git a/Source/Engine/Debug/DebugDraw.h b/Source/Engine/Debug/DebugDraw.h
index 0fc690a3b..1e6e3b23c 100644
--- a/Source/Engine/Debug/DebugDraw.h
+++ b/Source/Engine/Debug/DebugDraw.h
@@ -610,6 +610,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
#define DEBUG_DRAW_TRIANGLE(v0, v1, v2, color, duration, depthTest) DebugDraw::DrawTriangle(v0, v1, v2, color, duration, depthTest)
#define DEBUG_DRAW_TRIANGLES(vertices, color, duration, depthTest) DebugDraw::DrawTriangles(vertices, color, duration, depthTest)
#define DEBUG_DRAW_TRIANGLES_EX(vertices, indices, color, duration, depthTest) DebugDraw::DrawTriangles(vertices, indices, color, duration, depthTest)
+#define DEBUG_DRAW_TRIANGLES_EX2(vertices, indices, transform, color, duration, depthTest) DebugDraw::DrawTriangles(vertices, indices, transform, color, duration, depthTest)
#define DEBUG_DRAW_SPHERE(sphere, color, duration, depthTest) DebugDraw::DrawSphere(sphere, color, duration, depthTest)
#define DEBUG_DRAW_TUBE(position, orientation, radius, length, color, duration, depthTest) DebugDraw::DrawTube(position, orientation, radius, length, color, duration, depthTest)
#define DEBUG_DRAW_BOX(box, color, duration, depthTest) DebugDraw::DrawBox(box, color, duration, depthTest)
@@ -638,6 +639,7 @@ API_CLASS(Static) class FLAXENGINE_API DebugDraw
#define DEBUG_DRAW_TRIANGLE(v0, v1, v2, color, duration, depthTest)
#define DEBUG_DRAW_TRIANGLES(vertices, color, duration, depthTest)
#define DEBUG_DRAW_TRIANGLES_EX(vertices, indices, color, duration, depthTest)
+#define DEBUG_DRAW_TRIANGLES_EX2(vertices, indices, transform, color, duration, depthTest)
#define DEBUG_DRAW_SPHERE(sphere, color, duration, depthTest)
#define DEBUG_DRAW_TUBE(position, orientation, radius, length, color, duration, depthTest)
#define DEBUG_DRAW_BOX(box, color, duration, depthTest)
diff --git a/Source/Engine/Level/Actors/BoxVolume.cpp b/Source/Engine/Level/Actors/BoxVolume.cpp
index b7684ad90..78848a94f 100644
--- a/Source/Engine/Level/Actors/BoxVolume.cpp
+++ b/Source/Engine/Level/Actors/BoxVolume.cpp
@@ -27,6 +27,7 @@ void BoxVolume::SetSize(const Vector3& value)
#if USE_EDITOR
#include "Engine/Debug/DebugDraw.h"
+#include "Engine/Core/Math/Color.h"
Color BoxVolume::GetWiresColor()
{
diff --git a/Source/Engine/Level/Prefabs/Prefab.h b/Source/Engine/Level/Prefabs/Prefab.h
index 6651ab56a..a169a6b7e 100644
--- a/Source/Engine/Level/Prefabs/Prefab.h
+++ b/Source/Engine/Level/Prefabs/Prefab.h
@@ -15,14 +15,12 @@ class SceneObject;
///
API_CLASS(NoSpawn) class FLAXENGINE_API Prefab : public JsonAssetBase
{
-DECLARE_ASSET_HEADER(Prefab);
+ DECLARE_ASSET_HEADER(Prefab);
private:
-
bool _isCreatingDefaultInstance;
Actor* _defaultInstance;
public:
-
///
/// The serialized scene objects amount (actors and scripts).
///
@@ -49,11 +47,9 @@ public:
Dictionary ObjectsCache;
public:
-
///
/// Gets the root object identifier (prefab object ID). Asset must be loaded.
///
- /// The ID.
Guid GetRootObjectId() const
{
ASSERT(IsLoaded());
@@ -74,7 +70,6 @@ public:
API_FUNCTION() SceneObject* GetDefaultInstance(API_PARAM(Ref) const Guid& objectId);
#if USE_EDITOR
-
///
/// Applies the difference from the prefab object instance, saves the changes and synchronizes them with the active instances of the prefab asset.
///
@@ -83,11 +78,9 @@ public:
///
/// The root actor of spawned prefab instance to use as modified changes sources.
bool ApplyAll(Actor* targetActor);
-
#endif
private:
-
#if USE_EDITOR
typedef Array> NestedPrefabsList;
bool ApplyAllInternal(Actor* targetActor, bool linkTargetActorObjectToPrefab);
@@ -99,7 +92,6 @@ private:
void DeleteDefaultInstance();
protected:
-
// [JsonAssetBase]
LoadResult loadAsset() override;
void unload(bool isReloading) override;
diff --git a/Source/Engine/Level/SceneObject.h b/Source/Engine/Level/SceneObject.h
index 438c9b776..d044fe8cc 100644
--- a/Source/Engine/Level/SceneObject.h
+++ b/Source/Engine/Level/SceneObject.h
@@ -105,7 +105,6 @@ public:
///
/// Returns true if object has a parent assigned.
///
- /// True if has parent, otherwise false.
API_PROPERTY() FORCE_INLINE bool HasParent() const
{
return _parent != nullptr;
@@ -114,7 +113,6 @@ public:
///
/// Gets the parent actor (or null if object has no parent).
///
- /// The parent actor.
API_PROPERTY(Attributes="HideInEditor")
FORCE_INLINE Actor* GetParent() const
{
@@ -160,7 +158,6 @@ public:
///
/// Gets a value indicating whether this object has a valid linkage to the prefab asset.
///
- /// True if actor has valid prefab link, otherwise false.
API_PROPERTY() FORCE_INLINE bool HasPrefabLink() const
{
return _prefabID.IsValid();
@@ -169,7 +166,6 @@ public:
///
/// Gets the prefab asset ID. Empty if no prefab link exists.
///
- /// The prefab asset ID.
API_PROPERTY() FORCE_INLINE Guid GetPrefabID() const
{
return _prefabID;
@@ -178,7 +174,6 @@ public:
///
/// Gets the ID of the object within a prefab that is used for synchronization with this object. Empty if no prefab link exists.
///
- /// The prefab object ID.
API_PROPERTY() FORCE_INLINE Guid GetPrefabObjectID() const
{
return _prefabObjectID;
diff --git a/Source/Engine/Localization/LocalizedStringTable.cpp b/Source/Engine/Localization/LocalizedStringTable.cpp
index 8bb516f6f..8b91db0fe 100644
--- a/Source/Engine/Localization/LocalizedStringTable.cpp
+++ b/Source/Engine/Localization/LocalizedStringTable.cpp
@@ -110,8 +110,10 @@ bool LocalizedStringTable::Save(const StringView& path)
writer.EndObject();
// Save asset
+#if COMPILE_WITH_ASSETS_IMPORTER
const bool saveResult = CreateJson::Create(path.HasChars() ? path : StringView(GetPath()), outputData, TypeName);
if (saveResult)
+#endif
{
LOG(Error, "Cannot save \'{0}\'", ToString());
return true;
diff --git a/Source/Engine/Navigation/Navigation.cpp b/Source/Engine/Navigation/Navigation.cpp
index 248d7dd6d..a9e0711f8 100644
--- a/Source/Engine/Navigation/Navigation.cpp
+++ b/Source/Engine/Navigation/Navigation.cpp
@@ -215,7 +215,7 @@ void NavigationSettings::Apply()
if (area.Id < DT_MAX_AREAS)
{
NavMeshRuntime::NavAreasCosts[area.Id] = area.Cost;
-#if USE_EDITOR
+#if COMPILE_WITH_DEBUG_DRAW
NavMeshRuntime::NavAreasColors[area.Id] = area.Color;
#endif
}
diff --git a/Source/Engine/Particles/ParticleEmitter.cpp b/Source/Engine/Particles/ParticleEmitter.cpp
index be386e34c..1000754ae 100644
--- a/Source/Engine/Particles/ParticleEmitter.cpp
+++ b/Source/Engine/Particles/ParticleEmitter.cpp
@@ -16,6 +16,7 @@
#if USE_EDITOR
#include "ParticleEmitterFunction.h"
#include "Engine/ShadersCompilation/Config.h"
+#include "Engine/Particles/Graph/GPU/ParticleEmitterGraph.GPU.h"
#if BUILD_DEBUG
#include "Engine/Engine/Globals.h"
#endif
@@ -26,7 +27,6 @@
#include "Engine/Graphics/Shaders/Cache/ShaderStorage.h"
#endif
#if COMPILE_WITH_PARTICLE_GPU_GRAPH && COMPILE_WITH_SHADER_COMPILER
-#include "Engine/Particles/Graph/GPU/ParticleEmitterGraph.GPU.h"
#include "Engine/Utilities/Encryption.h"
#endif
diff --git a/Source/Engine/Physics/Colliders/BoxCollider.cpp b/Source/Engine/Physics/Colliders/BoxCollider.cpp
index a6d60fa12..45fb8d4fc 100644
--- a/Source/Engine/Physics/Colliders/BoxCollider.cpp
+++ b/Source/Engine/Physics/Colliders/BoxCollider.cpp
@@ -23,6 +23,7 @@ void BoxCollider::SetSize(const Float3& value)
#if USE_EDITOR
#include "Engine/Debug/DebugDraw.h"
+#include "Engine/Core/Math/Color.h"
#include "Engine/Graphics/RenderView.h"
void BoxCollider::DrawPhysicsDebug(RenderView& view)
@@ -31,9 +32,9 @@ void BoxCollider::DrawPhysicsDebug(RenderView& view)
if (!view.CullingFrustum.Intersects(sphere))
return;
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
- DebugDraw::DrawBox(_bounds, _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
+ DEBUG_DRAW_BOX(_bounds, _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
else
- DebugDraw::DrawWireBox(_bounds, Color::GreenYellow * 0.8f, 0, true);
+ DEBUG_DRAW_WIRE_BOX(_bounds, Color::GreenYellow * 0.8f, 0, true);
}
void BoxCollider::OnDebugDraw()
diff --git a/Source/Engine/Physics/Colliders/CapsuleCollider.cpp b/Source/Engine/Physics/Colliders/CapsuleCollider.cpp
index 84b16cb74..da06b2d77 100644
--- a/Source/Engine/Physics/Colliders/CapsuleCollider.cpp
+++ b/Source/Engine/Physics/Colliders/CapsuleCollider.cpp
@@ -49,9 +49,9 @@ void CapsuleCollider::DrawPhysicsDebug(RenderView& view)
const float radius = Math::Max(Math::Abs(_radius) * scaling, minSize);
const float height = Math::Max(Math::Abs(_height) * scaling, minSize);
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
- DebugDraw::DrawTube(_transform.LocalToWorld(_center), rot, radius, height, _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
+ DEBUG_DRAW_TUBE(_transform.LocalToWorld(_center), rot, radius, height, _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
else
- DebugDraw::DrawWireTube(_transform.LocalToWorld(_center), rot, radius, height, Color::GreenYellow * 0.8f, 0, true);
+ DEBUG_DRAW_WIRE_TUBE(_transform.LocalToWorld(_center), rot, radius, height, Color::GreenYellow * 0.8f, 0, true);
}
void CapsuleCollider::OnDebugDrawSelected()
diff --git a/Source/Engine/Physics/Colliders/CharacterController.cpp b/Source/Engine/Physics/Colliders/CharacterController.cpp
index daddff7ec..e6bd8cd52 100644
--- a/Source/Engine/Physics/Colliders/CharacterController.cpp
+++ b/Source/Engine/Physics/Colliders/CharacterController.cpp
@@ -179,9 +179,9 @@ void CharacterController::DrawPhysicsDebug(RenderView& view)
const float radius = Math::Max(Math::Abs(_radius) * scaling, minSize);
const float height = Math::Max(Math::Abs(_height) * scaling, minSize);
if (view.Mode == ViewMode::PhysicsColliders)
- DebugDraw::DrawTube(_transform.LocalToWorld(_center), Quaternion::Euler(90, 0, 0), radius, height, Color::LightYellow, 0, true);
+ DEBUG_DRAW_TUBE(_transform.LocalToWorld(_center), Quaternion::Euler(90, 0, 0), radius, height, Color::LightYellow, 0, true);
else
- DebugDraw::DrawWireTube(_transform.LocalToWorld(_center), Quaternion::Euler(90, 0, 0), radius, height, Color::GreenYellow * 0.8f, 0, true);
+ DEBUG_DRAW_WIRE_TUBE(_transform.LocalToWorld(_center), Quaternion::Euler(90, 0, 0), radius, height, Color::GreenYellow * 0.8f, 0, true);
}
void CharacterController::OnDebugDrawSelected()
diff --git a/Source/Engine/Physics/Colliders/MeshCollider.cpp b/Source/Engine/Physics/Colliders/MeshCollider.cpp
index 18eaf3882..c075ec4c1 100644
--- a/Source/Engine/Physics/Colliders/MeshCollider.cpp
+++ b/Source/Engine/Physics/Colliders/MeshCollider.cpp
@@ -77,11 +77,11 @@ void MeshCollider::DrawPhysicsDebug(RenderView& view)
Array* vertexBuffer;
Array* indexBuffer;
CollisionData->GetDebugTriangles(vertexBuffer, indexBuffer);
- DebugDraw::DrawTriangles(*vertexBuffer, *indexBuffer, _transform.GetWorld(), _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
+ DEBUG_DRAW_TRIANGLES_EX2(*vertexBuffer, *indexBuffer, _transform.GetWorld(), _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
}
else
{
- DebugDraw::DrawLines(CollisionData->GetDebugLines(), _transform.GetWorld(), Color::GreenYellow * 0.8f, 0, true);
+ DEBUG_DRAW_LINES(CollisionData->GetDebugLines(), _transform.GetWorld(), Color::GreenYellow * 0.8f, 0, true);
}
}
}
diff --git a/Source/Engine/Physics/Colliders/SphereCollider.cpp b/Source/Engine/Physics/Colliders/SphereCollider.cpp
index e0a4acbe9..593af7454 100644
--- a/Source/Engine/Physics/Colliders/SphereCollider.cpp
+++ b/Source/Engine/Physics/Colliders/SphereCollider.cpp
@@ -31,9 +31,9 @@ void SphereCollider::DrawPhysicsDebug(RenderView& view)
if (!view.CullingFrustum.Intersects(sphere))
return;
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
- DebugDraw::DrawSphere(_sphere, _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
+ DEBUG_DRAW_SPHERE(_sphere, _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
else
- DebugDraw::DrawWireSphere(_sphere, Color::GreenYellow * 0.8f, 0, true);
+ DEBUG_DRAW_WIRE_SPHERE(_sphere, Color::GreenYellow * 0.8f, 0, true);
}
void SphereCollider::OnDebugDrawSelected()
diff --git a/Source/Engine/Physics/Colliders/SplineCollider.cpp b/Source/Engine/Physics/Colliders/SplineCollider.cpp
index 75c61b6c3..ae32c1438 100644
--- a/Source/Engine/Physics/Colliders/SplineCollider.cpp
+++ b/Source/Engine/Physics/Colliders/SplineCollider.cpp
@@ -92,9 +92,9 @@ void SplineCollider::DrawPhysicsDebug(RenderView& view)
if (!view.CullingFrustum.Intersects(sphere))
return;
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
- DebugDraw::DrawTriangles(_vertexBuffer, _indexBuffer, Color::CornflowerBlue, 0, true);
+ DEBUG_DRAW_WIRE_TRIANGLES_EX(_vertexBuffer, _indexBuffer, Color::CornflowerBlue, 0, true);
else
- DebugDraw::DrawWireTriangles(_vertexBuffer, _indexBuffer, Color::GreenYellow * 0.8f, 0, true);
+ DEBUG_DRAW_WIRE_TRIANGLES_EX(_vertexBuffer, _indexBuffer, Color::GreenYellow * 0.8f, 0, true);
}
void SplineCollider::OnDebugDrawSelected()
diff --git a/Source/Engine/Physics/Joints/D6Joint.cpp b/Source/Engine/Physics/Joints/D6Joint.cpp
index 891c87572..e0ba4bdff 100644
--- a/Source/Engine/Physics/Joints/D6Joint.cpp
+++ b/Source/Engine/Physics/Joints/D6Joint.cpp
@@ -159,7 +159,7 @@ void D6Joint::OnDebugDrawSelected()
const float twistSize = 9.0f;
const Color swingColor = Color::Green.AlphaMultiplied(0.6f);
const Color twistColor = Color::Yellow.AlphaMultiplied(0.5f);
- DebugDraw::DrawWireArrow(target, targetRotation, swingSize / 100.0f * 0.5f, Color::Red, 0, false);
+ DEBUG_DRAW_WIRE_ARROW(target, targetRotation, swingSize / 100.0f * 0.5f, Color::Red, 0, false);
if (_motion[(int32)D6JointAxis::SwingY] == D6JointMotion::Locked && _motion[(int32)D6JointAxis::SwingZ] == D6JointMotion::Locked)
{
// Swing is locked
diff --git a/Source/Engine/Physics/Joints/HingeJoint.cpp b/Source/Engine/Physics/Joints/HingeJoint.cpp
index 2280322ac..a8ae3a82b 100644
--- a/Source/Engine/Physics/Joints/HingeJoint.cpp
+++ b/Source/Engine/Physics/Joints/HingeJoint.cpp
@@ -52,6 +52,7 @@ float HingeJoint::GetCurrentVelocity() const
#if USE_EDITOR
#include "Engine/Debug/DebugDraw.h"
+#include "Engine/Core/Math/Color.h"
void HingeJoint::OnDebugDrawSelected()
{
@@ -62,8 +63,8 @@ void HingeJoint::OnDebugDrawSelected()
const Quaternion targetRotation = GetTargetOrientation() * xRotation;
const float size = 15.0f;
const Color color = Color::Green.AlphaMultiplied(0.6f);
- DebugDraw::DrawWireArrow(source, sourceRotation, size / 100.0f * 0.5f, Color::Red, 0, false);
- DebugDraw::DrawWireArrow(target, targetRotation, size / 100.0f * 0.5f, Color::Blue, 0, false);
+ DEBUG_DRAW_WIRE_ARROW(source, sourceRotation, size / 100.0f * 0.5f, Color::Red, 0, false);
+ DEBUG_DRAW_WIRE_ARROW(target, targetRotation, size / 100.0f * 0.5f, Color::Blue, 0, false);
if (_flags & HingeJointFlag::Limit)
{
const float upper = Math::Max(_limit.Upper, _limit.Lower);
diff --git a/Source/Engine/Physics/Joints/SphericalJoint.cpp b/Source/Engine/Physics/Joints/SphericalJoint.cpp
index 918f9283b..568d8a49e 100644
--- a/Source/Engine/Physics/Joints/SphericalJoint.cpp
+++ b/Source/Engine/Physics/Joints/SphericalJoint.cpp
@@ -31,6 +31,7 @@ void SphericalJoint::SetLimit(const LimitConeRange& value)
#if USE_EDITOR
#include "Engine/Debug/DebugDraw.h"
+#include "Engine/Core/Math/Color.h"
void SphericalJoint::OnDebugDrawSelected()
{
@@ -38,7 +39,7 @@ void SphericalJoint::OnDebugDrawSelected()
const Vector3 target = GetTargetPosition();
const float size = 15.0f;
const Color color = Color::Green.AlphaMultiplied(0.6f);
- DebugDraw::DrawWireArrow(source, GetOrientation(), size / 100.0f * 0.5f, Color::Red, 0, false);
+ DEBUG_DRAW_WIRE_ARROW(source, GetOrientation(), size / 100.0f * 0.5f, Color::Red, 0, false);
if (_flags & SphericalJointFlag::Limit)
{
DEBUG_DRAW_CONE(source, GetOrientation(), size, _limit.YLimitAngle * DegreesToRadians, _limit.ZLimitAngle * DegreesToRadians, color, 0, false);
diff --git a/Source/Engine/Terrain/TerrainPatch.cpp b/Source/Engine/Terrain/TerrainPatch.cpp
index 67fa70a34..9b104c489 100644
--- a/Source/Engine/Terrain/TerrainPatch.cpp
+++ b/Source/Engine/Terrain/TerrainPatch.cpp
@@ -838,7 +838,7 @@ bool TerrainPatch::SetupHeightMap(int32 heightMapLength, const float* heightMap,
return true;
}
}
-#if USE_EDITOR
+#if COMPILE_WITH_ASSETS_IMPORTER
else
{
// Import data to the asset file
@@ -897,7 +897,7 @@ bool TerrainPatch::SetupHeightMap(int32 heightMapLength, const float* heightMap,
return true;
}
-#if USE_EDITOR
+#if COMPILE_WITH_ASSETS_IMPORTER
if (!useVirtualStorage)
{
// Import data to the asset file
@@ -1072,7 +1072,7 @@ bool TerrainPatch::SetupSplatMap(int32 index, int32 splatMapLength, const Color3
return true;
}
}
-#if USE_EDITOR
+#if COMPILE_WITH_ASSETS_IMPORTER
else
{
// Import data to the asset file
@@ -1659,7 +1659,7 @@ bool TerrainPatch::ModifySplatMap(int32 index, const Color32* samples, const Int
return true;
}
}
-#if USE_EDITOR
+#if COMPILE_WITH_ASSETS_IMPORTER
else
{
// Prepare asset path for the non-virtual asset
@@ -2254,7 +2254,7 @@ void TerrainPatch::DrawPhysicsDebug(RenderView& view)
if (view.Mode == ViewMode::PhysicsColliders)
{
- DebugDraw::DrawTriangles(GetCollisionTriangles(), Color::DarkOliveGreen, 0, true);
+ DEBUG_DRAW_TRIANGLES(GetCollisionTriangles(), Color::DarkOliveGreen, 0, true);
}
else
{
@@ -2264,7 +2264,7 @@ void TerrainPatch::DrawPhysicsDebug(RenderView& view)
{
if (_debugLines.IsEmpty())
CacheDebugLines();
- DebugDraw::DrawLines(_debugLines, world, Color::GreenYellow * 0.8f, 0, true);
+ DEBUG_DRAW_LINES(_debugLines, world, Color::GreenYellow * 0.8f, 0, true);
}
}
}
diff --git a/Source/Engine/Tools/ModelTool/ModelTool.cpp b/Source/Engine/Tools/ModelTool/ModelTool.cpp
index 1fbc5fe0e..d86680778 100644
--- a/Source/Engine/Tools/ModelTool/ModelTool.cpp
+++ b/Source/Engine/Tools/ModelTool/ModelTool.cpp
@@ -390,7 +390,8 @@ bool ModelTool::ImportData(const String& path, ImportedModelData& data, Options&
if (ImportDataOpenFBX(importPath.Get(), data, options, errorMsg))
return true;
#else
-#error Cannot use Model Tool without any importing backend!
+ LOG(Error, "Compiled without model importing backend.");
+ return true;
#endif
// Remove temporary file
@@ -809,6 +810,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
} while (importedFileNames.Contains(filename));
}
importedFileNames.Add(filename);
+#if COMPILE_WITH_ASSETS_IMPORTER
auto assetPath = autoImportOutput / filename + ASSET_FILES_EXTENSION_WITH_DOT;
TextureTool::Options textureOptions;
switch (texture.Type)
@@ -825,6 +827,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
default: ;
}
AssetsImportingManager::ImportIfEdited(texture.FilePath, assetPath, texture.AssetID, &textureOptions);
+#endif
}
// Prepare material
@@ -854,6 +857,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
} while (importedFileNames.Contains(filename));
}
importedFileNames.Add(filename);
+#if COMPILE_WITH_ASSETS_IMPORTER
auto assetPath = autoImportOutput / filename + ASSET_FILES_EXTENSION_WITH_DOT;
CreateMaterial::Options materialOptions;
materialOptions.Diffuse.Color = material.Diffuse.Color;
@@ -873,6 +877,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
if (!Math::IsOne(material.Opacity.Value) || material.Opacity.TextureIndex != -1)
materialOptions.Info.BlendMode = MaterialBlendMode::Transparent;
AssetsImportingManager::Create(AssetsImportingManager::CreateMaterialTag, assetPath, material.AssetID, &materialOptions);
+#endif
}
// Prepare import transformation
@@ -953,6 +958,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
}
if (collisionModel.LODs.HasItems())
{
+#if COMPILE_WITH_PHYSICS_COOKING
// Create collision
CollisionCooking::Argument arg;
arg.Type = CollisionDataType::TriangleMesh;
@@ -962,6 +968,7 @@ bool ModelTool::ImportModel(const String& path, ModelData& meshData, Options& op
{
LOG(Error, "Failed to create collision mesh.");
}
+#endif
}
}