Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b38f9b0
refactor: 未完成の外部キー制約を削除
cotore-game Jul 21, 2026
da30960
test: 外部キー制約のテストを削除
cotore-game Jul 21, 2026
7af01ff
docs: Validationの対応範囲を更新
cotore-game Jul 21, 2026
423a307
feat: 条件付きバリデーションを追加
cotore-game Jul 21, 2026
a7cb509
test: 条件付きバリデーションの検証を追加
cotore-game Jul 21, 2026
9ab8dda
docs: 条件付きバリデーションの利用方法を追加
cotore-game Jul 21, 2026
09f60aa
feat: Validationスキーマ表示を改善
cotore-game Jul 21, 2026
859473b
fix: スキーマ例外のラップを防止
cotore-game Jul 22, 2026
1e6bce2
feat: 読み取り専用CSV Viewerを追加
cotore-game Jul 22, 2026
98d094f
test: CSV Viewerの検索テストを追加
cotore-game Jul 22, 2026
2f97084
docs: CSV Viewerの利用方法を追加
cotore-game Jul 22, 2026
6f05fbe
Merge pull request #7 from cotore-game/refactor/remove-foreign-key-va…
cotore-game Jul 22, 2026
cdcad37
Merge remote-tracking branch 'origin/release/v0.3.0' into feat/condit…
cotore-game Jul 22, 2026
9530226
Merge pull request #8 from cotore-game/feat/conditional-validation
cotore-game Jul 22, 2026
afa52e8
Merge branch 'release/v0.3.0' into feat/csv-viewer
cotore-game Jul 22, 2026
e2fb910
Merge pull request #9 from cotore-game/feat/csv-viewer
cotore-game Jul 22, 2026
e07fd46
feat: CSV文字コードの検査とUTF-8変換を追加
cotore-game Jul 22, 2026
3c02ae1
test: CSV文字コード変換の検証を追加
cotore-game Jul 22, 2026
24acfed
docs: CSV文字コード変換の利用方法を追加
cotore-game Jul 22, 2026
cace6f9
fix: CSV文字コードの誤変換から復元可能にする
cotore-game Jul 22, 2026
af7e433
test: CSV文字コード変換の復元処理を検証
cotore-game Jul 22, 2026
7e1e81b
test: 文字コード検出用CSV fixtureを追加
cotore-game Jul 22, 2026
26d02b9
Merge pull request #10 from cotore-game/feat/csv-encoding
cotore-game Jul 22, 2026
60dda0a
feat: CsvSchema属性によるInspector登録を追加
cotore-game Jul 22, 2026
9a3ec96
refactor: Exampleと手動確認用スキーマを整理
cotore-game Jul 22, 2026
851b994
test: CsvSchemaの型発見を検証
cotore-game Jul 22, 2026
21c2083
docs: CsvSchemaの利用方法を追加
cotore-game Jul 22, 2026
eb0590d
Merge pull request #11 from cotore-game/feat/csv-schema-attribute
cotore-game Jul 22, 2026
c8d48cf
fix: TextAsset Inspectorへの影響をCSVに限定
cotore-game Jul 22, 2026
5f2b2f3
feat: CSV Viewerにズームを追加
cotore-game Jul 22, 2026
ce759d1
test: Editor UXの対象判定とズームを検証
cotore-game Jul 22, 2026
ac193f2
docs: InspectorとViewerズームの仕様を追記
cotore-game Jul 22, 2026
394faf3
Merge pull request #12 from cotore-game/feat/editor-ux
cotore-game Jul 22, 2026
59688e1
chore: v0.3.0のパッケージ情報を更新
cotore-game Jul 22, 2026
3edd025
docs: v0.3.0向けドキュメントを更新
cotore-game Jul 22, 2026
7295892
Merge pull request #13 from cotore-game/chore/v0.3.0-release-prep
cotore-game Jul 22, 2026
2052410
ci: mainマージ前のチェックを追加
cotore-game Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,11 @@
*.sh text eol=lf
*.ps1 text eol=lf

# Preserve the original bytes of encoding detection fixtures
Assets/TestData/CSV4Unity/EncodingDetection/EncodingShiftJis.csv binary
Assets/TestData/CSV4Unity/EncodingDetection/EncodingUtf16*.csv binary
Assets/TestData/CSV4Unity/EncodingDetection/EncodingUtf32*.csv binary
Assets/TestData/CSV4Unity/EncodingDetection/EncodingInvalid.csv binary

# Exclude TextMesh Pro files from language statistics
"Assets/TextMesh Pro/**" linguist-generated=true linguist-vendored=true
13 changes: 10 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Docs

on:
pull_request:
branches: [main]
paths:
- "Assets/Plugins/CSVLoader/Runtime/**/*.cs"
- "docs/**"
- ".github/workflows/docs.yml"
push:
branches: [main, develop]
paths:
Expand All @@ -11,8 +17,6 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: docs-${{ github.ref }}
Expand Down Expand Up @@ -54,8 +58,11 @@ jobs:
deploy:
name: Deploy to GitHub Pages
needs: build
if: github.ref == 'refs/heads/main'
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/unity-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Unity Tests

on:
pull_request:
branches: [main]
paths:
- "Assets/**"
- "Packages/**"
- "ProjectSettings/**"
- ".github/workflows/unity-tests.yml"
push:
branches: [main]
paths:
Expand Down Expand Up @@ -33,11 +40,23 @@ jobs:
restore-keys: |
Library-${{ runner.os }}-

- name: Verify Unity license configuration
shell: bash
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
run: |
if [[ -z "$UNITY_LICENSE" && -z "$UNITY_SERIAL" ]]; then
echo "::error::Configure either the UNITY_LICENSE or UNITY_SERIAL repository secret before running Unity tests."
exit 1
fi

- name: Run EditMode tests
id: tests
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
Expand Down
3 changes: 3 additions & 0 deletions Assets/Plugins/CSVLoader/Editor/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("CSV4Unity.Tests.EditMode")]
2 changes: 2 additions & 0 deletions Assets/Plugins/CSVLoader/Editor/AssemblyInfo.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Assets/Plugins/CSVLoader/Editor/CsvEditorAssetUtility.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#if UNITY_EDITOR
using System;
using System.IO;

namespace CSV4Unity.Editor
{
/// <summary>
/// CSV用Editor拡張が対象にするアセットを判定します。
/// </summary>
internal static class CsvEditorAssetUtility
{
internal static bool IsCsvPath(string assetPath)
{
return !string.IsNullOrEmpty(assetPath) &&
string.Equals(Path.GetExtension(assetPath), ".csv", StringComparison.OrdinalIgnoreCase);
}
}
}
#endif
2 changes: 2 additions & 0 deletions Assets/Plugins/CSVLoader/Editor/CsvEditorAssetUtility.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions Assets/Plugins/CSVLoader/Editor/CsvEncodingBackupUtility.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#if UNITY_EDITOR
using System;
using System.IO;

namespace CSV4Unity.Editor
{
/// <summary>
/// 文字コード変換前のCSVをLibrary以下へ退避し、必要に応じて復元します。
/// </summary>
internal static class CsvEncodingBackupUtility
{
public static bool CreateIfMissing(string backupPath, byte[] source)
{
if (string.IsNullOrEmpty(backupPath)) throw new ArgumentException("Backup path is required.", nameof(backupPath));
if (source == null) throw new ArgumentNullException(nameof(source));
if (File.Exists(backupPath)) return false;

string directory = Path.GetDirectoryName(backupPath);
if (!string.IsNullOrEmpty(directory)) Directory.CreateDirectory(directory);
WriteAtomically(backupPath, source);
return true;
}

public static void Restore(string backupPath, string targetPath)
{
if (string.IsNullOrEmpty(backupPath)) throw new ArgumentException("Backup path is required.", nameof(backupPath));
if (string.IsNullOrEmpty(targetPath)) throw new ArgumentException("Target path is required.", nameof(targetPath));
if (!File.Exists(backupPath)) throw new FileNotFoundException("CSV encoding backup was not found.", backupPath);

byte[] original = File.ReadAllBytes(backupPath);
WriteAtomically(targetPath, original);
File.Delete(backupPath);
}

public static void WriteAtomically(string targetPath, byte[] bytes)
{
if (string.IsNullOrEmpty(targetPath)) throw new ArgumentException("Target path is required.", nameof(targetPath));
if (bytes == null) throw new ArgumentNullException(nameof(bytes));

string directory = Path.GetDirectoryName(targetPath);
if (!string.IsNullOrEmpty(directory)) Directory.CreateDirectory(directory);

string temporaryPath = targetPath + ".csv4unity-" + Guid.NewGuid().ToString("N") + ".tmp";
try
{
File.WriteAllBytes(temporaryPath, bytes);
if (File.Exists(targetPath))
{
File.Replace(temporaryPath, targetPath, null);
}
else
{
File.Move(temporaryPath, targetPath);
}
}
finally
{
if (File.Exists(temporaryPath)) File.Delete(temporaryPath);
}
}
}
}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading