Singularity/Library/PackageCache/com.unity.2d.tilemap@1.0.0/Editor/TileDragAndDropHoverData.cs

28 lines
827 B
C#
Raw Permalink Normal View History

2024-05-06 14:45:45 -04:00
using UnityEngine;
using Object = UnityEngine.Object;
namespace UnityEditor.Tilemaps
{
internal struct TileDragAndDropHoverData
{
public Object hoverObject;
public Vector3 positionOffset;
public Vector3 scaleFactor;
public bool hasOffset;
public TileDragAndDropHoverData(Object hoverObject) : this(hoverObject, Vector3.zero, Vector3.one, false)
{
}
public TileDragAndDropHoverData(Object hoverObject, Vector3 positionOffset, Vector3 scaleFactor, bool hasOffset = true)
{
this.hoverObject = hoverObject;
this.positionOffset = positionOffset;
if (scaleFactor.z <= 0.0f)
scaleFactor.z = 1.0f;
this.scaleFactor = scaleFactor;
this.hasOffset = hasOffset;
}
}
}