diff --git a/Source/Editor/Editor.cs b/Source/Editor/Editor.cs index 795f89d55..3a11ed449 100644 --- a/Source/Editor/Editor.cs +++ b/Source/Editor/Editor.cs @@ -1686,9 +1686,6 @@ namespace FlaxEditor [return: MarshalAs(UnmanagedType.U1)] internal static partial bool Internal_CanSetToRoot(IntPtr prefab, IntPtr newRoot); - [LibraryImport("FlaxEngine", EntryPoint = "EditorInternal_GetPrefabNestedObject", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(StringMarshaller))] - internal static partial void Internal_GetPrefabNestedObject(IntPtr prefabId, IntPtr prefabObjectId, IntPtr outPrefabId, IntPtr outPrefabObjectId); - [LibraryImport("FlaxEngine", EntryPoint = "EditorInternal_GetAnimationTime", StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(StringMarshaller))] internal static partial float Internal_GetAnimationTime(IntPtr animatedModel); diff --git a/Source/Editor/Undo/Actions/BreakPrefabLinkAction.cs b/Source/Editor/Undo/Actions/BreakPrefabLinkAction.cs index 55553de25..a6f338633 100644 --- a/Source/Editor/Undo/Actions/BreakPrefabLinkAction.cs +++ b/Source/Editor/Undo/Actions/BreakPrefabLinkAction.cs @@ -23,7 +23,7 @@ namespace FlaxEditor.Actions public Guid PrefabID; public Guid PrefabObjectID; - public unsafe Item(SceneObject obj, List nestedPrefabLinks) + public Item(SceneObject obj, List nestedPrefabLinks) { ID = obj.ID; PrefabID = obj.PrefabID; @@ -33,8 +33,7 @@ namespace FlaxEditor.Actions // Check if this object comes from another nested prefab (to break link only from the top-level prefab) Item nested; nested.ID = ID; - fixed (Item* i = &this) - Editor.Internal_GetPrefabNestedObject(new IntPtr(&i->PrefabID), new IntPtr(&i->PrefabObjectID), new IntPtr(&nested.PrefabID), new IntPtr(&nested.PrefabObjectID)); + Editor.GetPrefabNestedObject(ref PrefabID, ref PrefabObjectID, out nested.PrefabID, out nested.PrefabObjectID); if (nested.PrefabID != Guid.Empty && nested.PrefabObjectID != Guid.Empty) nestedPrefabLinks.Add(nested); } diff --git a/Source/Engine/Serialization/Serialization.h b/Source/Engine/Serialization/Serialization.h index 125803f5b..a65b674a8 100644 --- a/Source/Engine/Serialization/Serialization.h +++ b/Source/Engine/Serialization/Serialization.h @@ -7,6 +7,7 @@ #include "Engine/Core/Collections/Array.h" #include "Engine/Core/Collections/Dictionary.h" #include "Engine/Scripting/ScriptingObject.h" +#include "Engine/Level/SceneObject.h" #include "Engine/Utilities/Encryption.h" struct Version;