Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

There is an issue accessing internal variables at runtime.

オープン
#147 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp, unity
領域
devtools, game-dev

調査の方向性

まず、ajustDll にある変更済みの Assembly-Csharp.dll と Library/ScriptAssemblies にあるランタイムの Assembly-CSharp.dll を比較し、次にパッチアセンブリがどのように生成されるかを調べます。提案された AssemblyInfo.cs と InternalsVisibleTo エントリを確認します。完了条件は、生成された Assembly-CSharp_Patch_0 から Assembly-CSharp_Patch_N のアセンブリがランタイムで内部変数にアクセスできることです。

索引モデルが issue の本文から書いたものです。

説明

Although a copy of the original assembly Assembly-Csharp.dll is located in the ajustDll folder and has been modified to make the patch assembly is a friend assembly to patch, allowing the patch assembly to compile with access to internal variables in Assembly-Csharp, the actual assembly running is not the DLL under the ajustdll folder but rather Assembly-CSharp.dll in Library/ScriptAssemblies. Therefore, accessing internal variables at runtime will cause issues.

I thought of a solution: adding a file named AssemblyInfo.cs to the project with the following content:
using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Assembly-CSharp_Patch_0")] [assembly: InternalsVisibleTo("Assembly-CSharp_Patch_1")] [assembly: InternalsVisibleTo("Assembly-CSharp_Patch_2")] [assembly: InternalsVisibleTo("Assembly-CSharp_Patch_3")] [assembly: InternalsVisibleTo("Assembly-CSharp_Patch_4")] [assembly: InternalsVisibleTo("Assembly-CSharp_Patch_5")] ... [assembly: InternalsVisibleTo("Assembly-CSharp_Patch_N")]

This way, during runtime, the generated patch file names will be Assembly-CSharp_Patch_0 to Assembly-CSharp_Patch_N, which will allow the patch assembly to access the internal variables in Assembly-Csharp with the proper permissions.

主要言語
C#
スター
2.2k
フォーク
167
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

handzlikchris/FastScriptReload のほかの issue

handzlikchris/FastScriptReload の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。