コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】Plane.Raycastで一時変数を宣言する必要がない拡張メソッド

using UnityEngine;

public static class PlaneExtensions
{
    public static float Raycast( this Plane self, Ray ray )
    {
        float enter;
        self.Raycast( ray, out enter );
        return enter;
    }
}