com.alicizax.unity.framework/Runtime/ABase/Structs/Layer.cs

29 lines
533 B
C#
Raw Normal View History

2025-10-11 15:18:09 +08:00
using System;
using UnityEngine;
namespace AlicizaX
{
[Serializable]
public struct Layer
{
public int index;
public static implicit operator int(Layer layer)
{
return layer.index;
}
public static implicit operator Layer(int intVal)
{
Layer result = default;
result.index = intVal;
return result;
}
public bool CompareLayer(GameObject obj)
{
return obj.layer == this;
}
}
}