Various fixes to allow compiling negine with custom build configurations

This commit is contained in:
Wojtek Figat
2022-07-26 23:06:03 +02:00
parent 8beb732cb9
commit ff1fba403d
18 changed files with 41 additions and 39 deletions

View File

@@ -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()
{

View File

@@ -15,14 +15,12 @@ class SceneObject;
/// <seealso cref="JsonAssetBase" />
API_CLASS(NoSpawn) class FLAXENGINE_API Prefab : public JsonAssetBase
{
DECLARE_ASSET_HEADER(Prefab);
DECLARE_ASSET_HEADER(Prefab);
private:
bool _isCreatingDefaultInstance;
Actor* _defaultInstance;
public:
/// <summary>
/// The serialized scene objects amount (actors and scripts).
/// </summary>
@@ -49,11 +47,9 @@ public:
Dictionary<Guid, const void*> ObjectsCache;
public:
/// <summary>
/// Gets the root object identifier (prefab object ID). Asset must be loaded.
/// </summary>
/// <returns>The ID.</returns>
Guid GetRootObjectId() const
{
ASSERT(IsLoaded());
@@ -74,7 +70,6 @@ public:
API_FUNCTION() SceneObject* GetDefaultInstance(API_PARAM(Ref) const Guid& objectId);
#if USE_EDITOR
/// <summary>
/// Applies the difference from the prefab object instance, saves the changes and synchronizes them with the active instances of the prefab asset.
/// </summary>
@@ -83,11 +78,9 @@ public:
/// </remarks>
/// <param name="targetActor">The root actor of spawned prefab instance to use as modified changes sources.</param>
bool ApplyAll(Actor* targetActor);
#endif
private:
#if USE_EDITOR
typedef Array<AssetReference<Prefab>> NestedPrefabsList;
bool ApplyAllInternal(Actor* targetActor, bool linkTargetActorObjectToPrefab);
@@ -99,7 +92,6 @@ private:
void DeleteDefaultInstance();
protected:
// [JsonAssetBase]
LoadResult loadAsset() override;
void unload(bool isReloading) override;

View File

@@ -105,7 +105,6 @@ public:
/// <summary>
/// Returns true if object has a parent assigned.
/// </summary>
/// <returns>True if has parent, otherwise false.</returns>
API_PROPERTY() FORCE_INLINE bool HasParent() const
{
return _parent != nullptr;
@@ -114,7 +113,6 @@ public:
/// <summary>
/// Gets the parent actor (or null if object has no parent).
/// </summary>
/// <returns>The parent actor.</returns>
API_PROPERTY(Attributes="HideInEditor")
FORCE_INLINE Actor* GetParent() const
{
@@ -160,7 +158,6 @@ public:
/// <summary>
/// Gets a value indicating whether this object has a valid linkage to the prefab asset.
/// </summary>
/// <returns>True if actor has valid prefab link, otherwise false.</returns>
API_PROPERTY() FORCE_INLINE bool HasPrefabLink() const
{
return _prefabID.IsValid();
@@ -169,7 +166,6 @@ public:
/// <summary>
/// Gets the prefab asset ID. Empty if no prefab link exists.
/// </summary>
/// <returns>The prefab asset ID.</returns>
API_PROPERTY() FORCE_INLINE Guid GetPrefabID() const
{
return _prefabID;
@@ -178,7 +174,6 @@ public:
/// <summary>
/// Gets the ID of the object within a prefab that is used for synchronization with this object. Empty if no prefab link exists.
/// </summary>
/// <returns>The prefab object ID.</returns>
API_PROPERTY() FORCE_INLINE Guid GetPrefabObjectID() const
{
return _prefabObjectID;