public override int GetHashCode() { unchecked { #pragma warning disable CA1307 return((Type.GetHashCode() * 397) ^ PathAndName.GetHashCode()); } }
/// <summary> /// プロジェクト内のシーン名とパスを解析 /// </summary> /// <returns>シーンの名前とパス</returns> public static List <PathAndName> AnalyzeNamePathAll() { List <PathAndName> listPN = new List <PathAndName>(); foreach (string scene in AssetDatabase.FindAssets("t:Scene")) { PathAndName PN = new PathAndName(); PN.path = AssetDatabase.GUIDToAssetPath(scene); PN.name = System.IO.Path.GetFileNameWithoutExtension(PN.path); listPN.Add(PN); } return(listPN); }
/// <summary> /// ビルド内のシーン名とパスを解析 /// </summary> /// <returns>シーンの名前とパス</returns> public static List <PathAndName> AnalyzeNamePathBuild() { List <PathAndName> listPN = new List <PathAndName>(); foreach (EditorBuildSettingsScene scene in EditorBuildSettings.scenes) { PathAndName PN = new PathAndName(); PN.path = scene.path; PN.name = System.IO.Path.GetFileNameWithoutExtension(PN.path); listPN.Add(PN); } return(listPN); }
/// <summary> /// ビルド内の開始シーンの検索 /// </summary> /// <returns>一番最初のシーン</returns> public static PathAndName FirstBuildNamePath() { PathAndName pn = new PathAndName(); foreach (EditorBuildSettingsScene scene in EditorBuildSettings.scenes) { if (!scene.enabled) { continue; } pn.path = scene.path; pn.name = System.IO.Path.GetFileNameWithoutExtension(pn.path); return(pn); } pn.name = ""; return(pn); }