diff --git a/Source/Engine/Level/Prefabs/Prefab.cpp b/Source/Engine/Level/Prefabs/Prefab.cpp
index b72f16633..65da270c0 100644
--- a/Source/Engine/Level/Prefabs/Prefab.cpp
+++ b/Source/Engine/Level/Prefabs/Prefab.cpp
@@ -90,11 +90,11 @@ SceneObject* Prefab::GetDefaultInstance(const Guid& objectId)
if (objectId.IsValid())
{
- const void* object;
+ SceneObject* object;
if (ObjectsCache.TryGet(objectId, object))
{
// Actor or Script
- return (SceneObject*)object;
+ return object;
}
}
diff --git a/Source/Engine/Level/Prefabs/Prefab.h b/Source/Engine/Level/Prefabs/Prefab.h
index 5e0075edf..9fa2b4fd0 100644
--- a/Source/Engine/Level/Prefabs/Prefab.h
+++ b/Source/Engine/Level/Prefabs/Prefab.h
@@ -44,7 +44,7 @@ public:
///
/// The objects cache maps the id of the object contained in the prefab asset (actor or script) to the default instance deserialized from prefab data. Valid only if asset is loaded and GetDefaultInstance was called.
///
- Dictionary ObjectsCache;
+ Dictionary ObjectsCache;
public:
///
diff --git a/Source/Engine/Level/Prefabs/PrefabManager.cpp b/Source/Engine/Level/Prefabs/PrefabManager.cpp
index c7b42b7d2..bb4710bc7 100644
--- a/Source/Engine/Level/Prefabs/PrefabManager.cpp
+++ b/Source/Engine/Level/Prefabs/PrefabManager.cpp
@@ -76,12 +76,12 @@ Actor* PrefabManager::SpawnPrefab(Prefab* prefab, Actor* parent)
return SpawnPrefab(prefab, Transform(Vector3::Minimum), parent, nullptr);
}
-Actor* PrefabManager::SpawnPrefab(Prefab* prefab, Actor* parent, Dictionary* objectsCache, bool withSynchronization)
+Actor* PrefabManager::SpawnPrefab(Prefab* prefab, Actor* parent, Dictionary* objectsCache, bool withSynchronization)
{
return SpawnPrefab(prefab, Transform(Vector3::Minimum), parent, objectsCache, withSynchronization);
}
-Actor* PrefabManager::SpawnPrefab(Prefab* prefab, const Transform& transform, Actor* parent, Dictionary* objectsCache, bool withSynchronization)
+Actor* PrefabManager::SpawnPrefab(Prefab* prefab, const Transform& transform, Actor* parent, Dictionary* objectsCache, bool withSynchronization)
{
PROFILE_CPU_NAMED("Prefab.Spawn");
if (prefab == nullptr)
diff --git a/Source/Engine/Level/Prefabs/PrefabManager.h b/Source/Engine/Level/Prefabs/PrefabManager.h
index 16d4a29cf..e5600bac4 100644
--- a/Source/Engine/Level/Prefabs/PrefabManager.h
+++ b/Source/Engine/Level/Prefabs/PrefabManager.h
@@ -89,7 +89,7 @@ API_CLASS(Static) class FLAXENGINE_API PrefabManager
/// The options output objects cache that can be filled with prefab object id mapping to deserialized object (actor or script).
/// True if perform prefab changes synchronization for the spawned objects. It will check if need to add new objects due to nested prefab modifications.
/// The created actor (root) or null if failed.
- static Actor* SpawnPrefab(Prefab* prefab, Actor* parent, Dictionary* objectsCache, bool withSynchronization = false);
+ static Actor* SpawnPrefab(Prefab* prefab, Actor* parent, Dictionary* objectsCache, bool withSynchronization = false);
///
/// Spawns the instance of the prefab objects. If parent actor is specified then created actors are fully initialized (OnLoad event and BeginPlay is called if parent actor is already during gameplay).
@@ -100,7 +100,7 @@ API_CLASS(Static) class FLAXENGINE_API PrefabManager
/// The options output objects cache that can be filled with prefab object id mapping to deserialized object (actor or script).
/// True if perform prefab changes synchronization for the spawned objects. It will check if need to add new objects due to nested prefab modifications.
/// The created actor (root) or null if failed.
- static Actor* SpawnPrefab(Prefab* prefab, const Transform& transform, Actor* parent, Dictionary* objectsCache, bool withSynchronization = false);
+ static Actor* SpawnPrefab(Prefab* prefab, const Transform& transform, Actor* parent, Dictionary* objectsCache, bool withSynchronization = false);
#if USE_EDITOR
diff --git a/Source/Engine/Serialization/JsonWriter.cpp b/Source/Engine/Serialization/JsonWriter.cpp
index 223baf77e..35e4412d4 100644
--- a/Source/Engine/Serialization/JsonWriter.cpp
+++ b/Source/Engine/Serialization/JsonWriter.cpp
@@ -466,7 +466,7 @@ void JsonWriter::SceneObject(::SceneObject* obj)
prefab->GetDefaultInstance();
// Get prefab object instance from the prefab
- const void* prefabObject;
+ ::SceneObject* prefabObject;
if (prefab->ObjectsCache.TryGet(obj->GetPrefabObjectID(), prefabObject))
{
// Serialize modified properties compared with the default object from prefab