Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsakharov committed Nov 25, 2024
2 parents 215f9be + 3c215d9 commit 5b31c8b
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Prowl.Editor/Editor/AssetsBrowserWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Prowl.Runtime;
using Prowl.Runtime.GUI;
using Prowl.Runtime.Rendering;
using Prowl.Runtime.Utilities;
using Prowl.Runtime.Utils;

namespace Prowl.Editor;

Expand Down
1 change: 0 additions & 1 deletion Prowl.Editor/Editor/ScriptedEditors/GameObjectEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Prowl.Runtime.Cloning;
using Prowl.Runtime.GUI;
using Prowl.Runtime.GUI.Layout;
using Prowl.Runtime.Utilities;
using Prowl.Runtime.Utils;

using static Prowl.Editor.EditorGUI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Prowl.Runtime;
using Prowl.Runtime.Cloning;
using Prowl.Runtime.SceneManagement;
using Prowl.Runtime.Utilities;
using Prowl.Runtime.Utils;

namespace Prowl.Editor.Utilities;

Expand Down Expand Up @@ -66,10 +66,10 @@ protected override void Do()
if (go == null)
throw new InvalidOperationException("Could not find GameObject with identifier: " + GameObject);

_gameObject = go.DeepClone(new(false));
_gameObject = go.DeepClone();
_parent = go.parent?.Identifier ?? Guid.Empty;

var clone = _gameObject.DeepClone();
var clone = _gameObject.DeepClone(new(false));
_clone = clone.Identifier;
GameObject? parent = EngineObject.FindObjectByIdentifier<GameObject>(_parent);
if (parent != null)
Expand Down
2 changes: 1 addition & 1 deletion Prowl.Runtime/Components/Physics/Rigidbody3D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public override void Update()
Transform.rotation = new Quaternion(_body.Orientation.X, _body.Orientation.Y, _body.Orientation.Z, _body.Orientation.W);
}

public override void DrawGizmos()
public override void DrawGizmosSelected()
{
if (_body == null || _body.Handle.IsZero || !Application.IsEditor) return;

Expand Down
2 changes: 1 addition & 1 deletion Prowl.Runtime/Components/Testings/TestDrawers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using Prowl.Icons;

namespace Prowl.Runtime.Components.Testings;
namespace Prowl.Runtime;

[AddComponentMenu($"{FontAwesome6.Dna} Testing/{FontAwesome6.Shapes} TestDrawers")]
public class TestDrawers : MonoBehaviour
Expand Down
2 changes: 1 addition & 1 deletion Prowl.Runtime/Components/UI/GuiLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

using Veldrid;

namespace Prowl.Runtime.Components.UI;
namespace Prowl.Runtime;

[RequireComponent(typeof(Camera))]
[AddComponentMenu($"{FontAwesome6.MoneyCheck} GUI/{FontAwesome6.WindowMaximize} GUI Layer")]
Expand Down
2 changes: 1 addition & 1 deletion Prowl.Runtime/GameObject/GameObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

using Prowl.Runtime.Cloning;
using Prowl.Runtime.SceneManagement;
using Prowl.Runtime.Utilities;
using Prowl.Runtime.Utils;

using SoftCircuits.Collections;
using Prowl.Echo;
Expand Down
7 changes: 1 addition & 6 deletions Prowl.Runtime/GameObject/MonoBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public abstract class MonoBehaviour : EngineObject
{
private static readonly Dictionary<Type, bool> CachedExecuteAlways = new();

[SerializeField, HideInInspector]
[SerializeField, HideInInspector, CloneField(CloneFieldFlags.IdentityRelevant)]
private Guid _identifier = Guid.NewGuid();

[SerializeField, HideInInspector]
Expand Down Expand Up @@ -607,17 +607,12 @@ public void CopyTo(MonoBehaviour target)

public override void SetupCloneTargets(object targetObj, ICloneTargetSetup setup)
{
if (this == targetObj)
System.Diagnostics.Debugger.Break();
MonoBehaviour target = targetObj as MonoBehaviour;
this.OnSetupCloneTargets(targetObj, setup);
}

public override void CopyDataTo(object targetObj, ICloneOperation operation)
{
if (this == targetObj)
System.Diagnostics.Debugger.Break();

MonoBehaviour target = targetObj as MonoBehaviour;
if (!operation.Context.PreserveIdentity)
target._identifier = _identifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

using Prowl.Runtime.Components.UI;
using Prowl.Runtime;

using Veldrid;

Expand Down
2 changes: 1 addition & 1 deletion Prowl.Runtime/Resources/Prefab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using Prowl.Runtime.Cloning;
using Prowl.Runtime.SceneManagement;
using Prowl.Runtime.Utilities;
using Prowl.Runtime.Utils;
using Prowl.Echo;

namespace Prowl.Runtime;
Expand Down
2 changes: 1 addition & 1 deletion Prowl.Runtime/Resources/Scene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Linq;

using Prowl.Runtime.Cloning;
using Prowl.Runtime.Utilities;
using Prowl.Runtime.Utils;

using Vortice.Direct3D11;
using Prowl.Echo;
Expand Down
2 changes: 1 addition & 1 deletion Prowl.Runtime/Utils/PrefabUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Text;
using System.Threading.Tasks;

namespace Prowl.Runtime.Utilities;
namespace Prowl.Runtime.Utils;

public static class PrefabUtility
{
Expand Down

0 comments on commit 5b31c8b

Please sign in to comment.