Skip to content

【Unity】Editor extension that writes Git information to a text file in the Resources folder at build time

License

Notifications You must be signed in to change notification settings

studentutu/Kogane.SaveGitInfoToTextFileOnBuild

 
 

Repository files navigation

Kogane Save Git Info To Text File On Build

ビルド時に Git の情報を Resources フォルダのテキストファイルに書き込むエディタ拡張

使用例

2022-10-15_162223

Project Settings で Git の情報を書き込むテキストファイルの保存場所や
書き込むテキストファイルのフォーマットを設定します

using UnityEngine;

public class Example : MonoBehaviour
{
    private void Awake()
    {
        var textAsset = Resources.Load<TextAsset>( "git" );
        Debug.Log( textAsset != null ? textAsset.text : "" );
    }
}

そして上記のようなコードを記述することで
ビルド時における Git のブランチ名やコミットログを取得できます

About

【Unity】Editor extension that writes Git information to a text file in the Resources folder at build time

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C# 100.0%