Skip to content

Commit 1fac9d2

Browse files
committed
Create AGENTS.md
1 parent 3493d40 commit 1fac9d2

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Unity-SerializeReferenceExtensions — AGENTS.md
2+
3+
## Project overview
4+
This repository provides editor tooling for Unity's [SerializeReference], including `SubclassSelector`
5+
to pick concrete implementations of interfaces / abstract types in the Inspector.
6+
7+
Primary risk area: type discovery & filtering (what types appear in the selector).
8+
9+
## Repository layout
10+
- Repository URL: `https://github.com/mackysoft/Unity-SerializeReferenceExtensions`
11+
- Package source: `Assets/MackySoft/MackySoft.SerializeReferenceExtensions`
12+
- Editor code: `.../Editor/**`
13+
- Tests: `.../Tests/**`
14+
15+
## Unity compatibility (critical)
16+
- Minimum supported Unity: 2021.3 (baseline for development/testing).
17+
- Unity 2023.2+ has enhanced generic type support (variance, etc.). Changes must not break 2021.3 behavior and guarded by `UNITY_2023_2_OR_NEWER`.
18+
19+
## CI (GitHub Actions)
20+
I use GameCI `unity-test-runner`.
21+
- Always run EditMode tests.
22+
- Run a Unity matrix that includes:
23+
- 2021.3.x (minimum baseline)
24+
- 2023.2+ (generic/variance feature gate)
25+
26+
## Architecture guardrails
27+
- Runtime surface area should remain minimal (mainly attributes / data structures).
28+
- Editor implementation (PropertyDrawer/UI/type search) must stay under `Editor/`.
29+
- Avoid introducing UnityEditor references into Runtime assemblies.
30+
31+
## Coding conventions
32+
- Prefer `UnityEditor.TypeCache` for type discovery. Avoid full AppDomain scans unless necessary.
33+
- Keep allocations low in IMGUI paths (e.g., `OnGUI`).
34+
- Keep public API stable; if changing type filtering behavior, add/adjust tests.
35+
- As a general rule, you should follow the restrictions on SerializeReference in Unity's official documentation.
36+
- https://docs.unity3d.com/ScriptReference/SerializeReference.html

0 commit comments

Comments
 (0)