Skip to content

Commit

Permalink
Fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
VaLiuM09 committed Apr 30, 2024
1 parent b788540 commit 0f5f05e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Source/Runtime/Properties/SnapZoneProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected SnapZone SnapZone
{
get
{
if(snapZone == null)
if (snapZone == null)
{
snapZone = GetComponent<SnapZone>();
}
Expand Down Expand Up @@ -80,7 +80,7 @@ private void HandleSnapped(Grabbable grabbable)
SnappedObject = grabbable.GetComponent<SnappableProperty>();
if (SnappedObject == null)
{
Debug.LogWarning($"SnapZone '{SceneObject.UniqueName}' received snap from object '{grabbable.gameObject.name}' without {typeof(SnappableProperty).Name}");
Debug.LogWarning($"SnapZone '{SceneObject.GameObject.name}' received snap from object '{grabbable.gameObject.name}' without {typeof(SnappableProperty).Name}");
}
else
{
Expand Down Expand Up @@ -116,7 +116,7 @@ protected void EmitUnsnapped()
}

public void Configure(IMode mode)
{
{
}

protected override void InternalSetLocked(bool lockState)
Expand Down
14 changes: 7 additions & 7 deletions Source/Runtime/Properties/SnappableProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class SnappableProperty : LockableProperty, ISnappableProperty
/// The grabbable property on this game object.
/// </summary>
protected GrabbableProperty GrabbableProperty
{
{
get
{
if (grabbableProperty == null)
Expand All @@ -37,8 +37,8 @@ protected GrabbableProperty GrabbableProperty

return grabbableProperty;
}
}
}

/// <inheritdoc/>
public bool LockObjectOnSnap { get; set; }

Expand Down Expand Up @@ -82,18 +82,18 @@ private void HandleUnsnapped()
private void HandleSnapped()
{
Transform parent = transform.parent;
if(parent == null)

if (parent == null)
{
Debug.LogError($"Object {SceneObject.UniqueName} should be snapped but is not child object.");
Debug.LogError($"Object {SceneObject.GameObject.name} should be snapped but is not child object.");
return;
}

SnapZoneProperty snapZone = parent.GetComponent<SnapZoneProperty>();

if (snapZone == null)
{
Debug.LogWarning($"Object {SceneObject.UniqueName} has been snapped to a snap zone without a {typeof(SnapZoneProperty).Name}. The VR Builder process will not see the object as snapped.");
Debug.LogWarning($"Object {SceneObject.GameObject.name} has been snapped to a snap zone without a {typeof(SnapZoneProperty).Name}. The VR Builder process will not see the object as snapped.");
return;
}

Expand Down

0 comments on commit 0f5f05e

Please sign in to comment.