Luaだと複数戻り値を受け取り方法はあるのだが、C#でも複数戻り値を受け取る方法無いのかなと調べたら、
新しめのC#であればTupleValueという物が使えるようなので、備忘録
using UnityEngine; public class TupleTest : MonoBehaviour { // Start is called before the first frame update void Start() { Test(); } private void Test() { var (resInt, resString, resGameObject) = MultiValueReturnFunction(); Debug.Log(resInt); // 10 Debug.Log(resString); // あいうえお Debug.Log(resGameObject); // スクリプトアタッチしているオブジェクトの情報 } private (int, string, GameObject) MultiValueReturnFunction() { int resInt = 10; string resString = "あいうえお"; GameObject resGameObject = this.gameObject; return (resInt, resString, resGameObject); } }