您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
25 行
783 B
25 行
783 B
using UnityEngine;
|
|
|
|
namespace UnityEditor.Experimental.Rendering.Universal.Path2D.GUIFramework
|
|
{
|
|
internal struct LayoutData
|
|
{
|
|
public int index;
|
|
public float distance;
|
|
public Vector3 position;
|
|
public Vector3 forward;
|
|
public Vector3 up;
|
|
public Vector3 right;
|
|
public object userData;
|
|
|
|
public static readonly LayoutData zero = new LayoutData() { index = 0, distance = float.MaxValue, position = Vector3.zero, forward = Vector3.forward, up = Vector3.up, right = Vector3.right };
|
|
|
|
public static LayoutData Nearest(LayoutData currentData, LayoutData newData)
|
|
{
|
|
if (newData.distance <= currentData.distance)
|
|
return newData;
|
|
|
|
return currentData;
|
|
}
|
|
}
|
|
}
|