Version: 2017.2

Path.Combine(string, string)

マニュアルに切り替える

説明

二つのパス文字列を連結します

もし path1 が有効なセパレーター文字で終了しない場合、連結の前に :ref::DirectorySeparatorChar が path1 に追加されます。

using System.IO;
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { Debug.Log(Path.Combine("/First/Path/To", "Some/File/At/foo.txt")); } }