Fixed Serialization Transfer.
This commit is contained in:
@@ -75,6 +75,11 @@ namespace FlaxEditor.Actions
|
||||
_enabled = true;
|
||||
}
|
||||
|
||||
public int GetOrderInParent()
|
||||
{
|
||||
return _orderInParent;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new added script undo action.
|
||||
/// </summary>
|
||||
@@ -184,6 +189,7 @@ namespace FlaxEditor.Actions
|
||||
script.Parent = parentActor;
|
||||
if (_orderInParent != -1)
|
||||
script.OrderInParent = _orderInParent;
|
||||
_orderInParent = script.OrderInParent; // Ensure _orderInParent is correct for script that want to use it.
|
||||
if (_prefabObjectId != Guid.Empty)
|
||||
SceneObject.Internal_LinkPrefab(Object.GetUnmanagedPtr(script), ref _prefabId, ref _prefabObjectId);
|
||||
Editor.Instance.Scene.MarkSceneEdited(parentActor.Scene);
|
||||
|
||||
Reference in New Issue
Block a user