https://docs.microsoft.com/zh-cn/dotnet/csharp/language-reference/keywords/explicit
https://docs.microsoft.com/zh-cn/dotnet/csharp/language-reference/keywords/implicit
https://docs.microsoft.com/zh-cn/dotnet/csharp/language-reference/keywords/operator
Vector2隐匿转换例子
public struct Vector2 {
public static implicit operator Vector2(Vector3 v){
return new Vector2(v.x,v.y);
} public static implicit operator Vector3(Vector2 v){
return new Vector3(v.x,v.y,);
}
}