Skip to content

Commit 6dbd026

Browse files
feat: adding Editor UI for the sample ClientNetworkTransform. (#1827)
* feat: adding Editor UI for the sample ClientNetworkTransform. The added UI is a simple copy of the NetworkTransform one * modify networkTransformEditor to support child class Co-authored-by: Matt Walsh <matt.walsh@unity3d.com>
1 parent 1841c24 commit 6dbd026

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

com.unity.netcode.gameobjects/Components/NetworkTransform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReade
272272
/// If using different values, please use RPCs to write to the server. Netcode doesn't support client side network variable writing
273273
/// </summary>
274274
// This is public to make sure that users don't depend on this IsClient && IsOwner check in their code. If this logic changes in the future, we can make it invisible here
275-
public bool CanCommitToTransform;
275+
public bool CanCommitToTransform { get; protected set; }
276276
protected bool m_CachedIsServer;
277277
protected NetworkManager m_CachedNetworkManager;
278278

com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Unity.Netcode.Editor
66
{
7-
[CustomEditor(typeof(NetworkTransform))]
7+
[CustomEditor(typeof(NetworkTransform), true)]
88
public class NetworkTransformEditor : UnityEditor.Editor
99
{
1010
private SerializedProperty m_SyncPositionXProperty;

0 commit comments

Comments
 (0)