Skip to content

Commit c2c6865

Browse files
chore: update Unity API data
1 parent 1f9cb8e commit c2c6865

1 file changed

Lines changed: 84 additions & 42 deletions

File tree

mcp-server/data/lifecycle_order.json

Lines changed: 84 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,175 +2,217 @@
22
{
33
"method": "Awake",
44
"phase": "Initialization",
5-
"description": "Called when the script instance is loaded. Used to initialize variables and references between scripts. Called even if the component is disabled.",
5+
"description": "MonoBehaviour.Awake callback.",
66
"runs_per_frame": false,
77
"thread": "main"
88
},
99
{
1010
"method": "OnEnable",
1111
"phase": "Initialization",
12-
"description": "Called when the object becomes enabled and active. Called immediately after Awake on first load, and each time the component is re-enabled.",
12+
"description": "MonoBehaviour.OnEnable callback.",
1313
"runs_per_frame": false,
1414
"thread": "main"
1515
},
1616
{
1717
"method": "Reset",
1818
"phase": "Initialization",
19-
"description": "Called in the editor only when the script is first attached or when Reset is selected in the context menu. Used to initialize default values.",
19+
"description": "MonoBehaviour.Reset callback.",
2020
"runs_per_frame": false,
2121
"thread": "main"
2222
},
2323
{
2424
"method": "Start",
2525
"phase": "Initialization",
26-
"description": "Called before the first frame update, only if the script instance is enabled. Called after all Awake calls. Use for setup that depends on other objects being initialized.",
26+
"description": "MonoBehaviour.Start callback.",
2727
"runs_per_frame": false,
2828
"thread": "main"
2929
},
3030
{
3131
"method": "FixedUpdate",
3232
"phase": "Physics",
33-
"description": "Called at a fixed time interval (default 0.02s). Used for physics calculations and Rigidbody manipulation. Independent of frame rate.",
33+
"description": "MonoBehaviour.FixedUpdate callback.",
3434
"runs_per_frame": true,
3535
"thread": "main"
3636
},
3737
{
3838
"method": "OnTriggerEnter",
3939
"phase": "Physics",
40-
"description": "Called when a Collider enters a trigger collider attached to this object. Requires at least one object to have a Rigidbody.",
40+
"description": "MonoBehaviour.OnTriggerEnter callback.",
4141
"runs_per_frame": false,
4242
"thread": "main"
4343
},
4444
{
4545
"method": "OnTriggerStay",
4646
"phase": "Physics",
47-
"description": "Called once per physics update for every Collider that is touching a trigger. Can fire multiple times per frame during physics catch-up.",
47+
"description": "MonoBehaviour.OnTriggerStay callback.",
4848
"runs_per_frame": true,
4949
"thread": "main"
5050
},
5151
{
5252
"method": "OnTriggerExit",
5353
"phase": "Physics",
54-
"description": "Called when a Collider stops touching a trigger collider attached to this object.",
54+
"description": "MonoBehaviour.OnTriggerExit callback.",
5555
"runs_per_frame": false,
5656
"thread": "main"
5757
},
5858
{
5959
"method": "OnCollisionEnter",
6060
"phase": "Physics",
61-
"description": "Called when a collision between two non-trigger colliders begins. Provides ContactPoint data for the impact.",
61+
"description": "MonoBehaviour.OnCollisionEnter callback.",
6262
"runs_per_frame": false,
6363
"thread": "main"
6464
},
6565
{
6666
"method": "OnCollisionStay",
6767
"phase": "Physics",
68-
"description": "Called once per physics update while two non-trigger colliders remain in contact.",
68+
"description": "MonoBehaviour.OnCollisionStay callback.",
6969
"runs_per_frame": true,
7070
"thread": "main"
7171
},
7272
{
7373
"method": "OnCollisionExit",
7474
"phase": "Physics",
75-
"description": "Called when a collision between two non-trigger colliders ends.",
75+
"description": "MonoBehaviour.OnCollisionExit callback.",
7676
"runs_per_frame": false,
7777
"thread": "main"
7878
},
7979
{
8080
"method": "Update",
8181
"phase": "Game Logic",
82-
"description": "Called once per frame. The main function for per-frame game logic. Frame rate dependent - use Time.deltaTime for consistent behavior.",
82+
"description": "MonoBehaviour.Update callback.",
8383
"runs_per_frame": true,
8484
"thread": "main"
8585
},
8686
{
8787
"method": "LateUpdate",
8888
"phase": "Game Logic",
89-
"description": "Called once per frame after all Update calls. Commonly used for camera follow logic and any processing that should happen after movement is complete.",
89+
"description": "MonoBehaviour.LateUpdate callback.",
9090
"runs_per_frame": true,
9191
"thread": "main"
9292
},
9393
{
9494
"method": "OnAnimatorMove",
9595
"phase": "Animation",
96-
"description": "Called at each frame after the state machines and animations have been evaluated but before OnAnimatorIK. Used to apply root motion manually.",
96+
"description": "MonoBehaviour.OnAnimatorMove callback.",
9797
"runs_per_frame": true,
9898
"thread": "main"
9999
},
100100
{
101101
"method": "OnAnimatorIK",
102102
"phase": "Animation",
103-
"description": "Called after the Animator has computed its final IK state. Used for setting up IK goals and weights for procedural animation.",
103+
"description": "MonoBehaviour.OnAnimatorIK callback.",
104104
"runs_per_frame": true,
105105
"thread": "main"
106106
},
107107
{
108-
"method": "OnGUI",
108+
"method": "OnPreCull",
109109
"phase": "Rendering",
110-
"description": "Called multiple times per frame for GUI event processing. Legacy IMGUI system - prefer UI Toolkit or uGUI for new projects.",
110+
"description": "MonoBehaviour.OnPreCull callback.",
111111
"runs_per_frame": true,
112112
"thread": "main"
113113
},
114114
{
115-
"method": "OnDrawGizmos",
115+
"method": "OnBecameVisible",
116+
"phase": "Rendering",
117+
"description": "MonoBehaviour.OnBecameVisible callback.",
118+
"runs_per_frame": false,
119+
"thread": "main"
120+
},
121+
{
122+
"method": "OnBecameInvisible",
123+
"phase": "Rendering",
124+
"description": "MonoBehaviour.OnBecameInvisible callback.",
125+
"runs_per_frame": false,
126+
"thread": "main"
127+
},
128+
{
129+
"method": "OnWillRenderObject",
116130
"phase": "Rendering",
117-
"description": "Called every frame in the editor when the object is visible. Used to draw debug visualization gizmos in the Scene view.",
131+
"description": "MonoBehaviour.OnWillRenderObject callback.",
118132
"runs_per_frame": true,
119133
"thread": "main"
120134
},
121135
{
122-
"method": "OnDrawGizmosSelected",
136+
"method": "OnPreRender",
123137
"phase": "Rendering",
124-
"description": "Called every frame in the editor only when the object is selected. Used for selection-specific debug visualizations.",
138+
"description": "MonoBehaviour.OnPreRender callback.",
125139
"runs_per_frame": true,
126140
"thread": "main"
127141
},
128142
{
129-
"method": "OnApplicationPause",
130-
"phase": "Application",
131-
"description": "Called when the application pauses or resumes (e.g., losing focus on mobile). Receives a bool indicating pause state.",
132-
"runs_per_frame": false,
143+
"method": "OnRenderObject",
144+
"phase": "Rendering",
145+
"description": "MonoBehaviour.OnRenderObject callback.",
146+
"runs_per_frame": true,
133147
"thread": "main"
134148
},
135149
{
136-
"method": "OnApplicationFocus",
137-
"phase": "Application",
138-
"description": "Called when the application gains or loses focus. Receives a bool indicating focus state. On mobile, maps to app foregrounding.",
150+
"method": "OnPostRender",
151+
"phase": "Rendering",
152+
"description": "MonoBehaviour.OnPostRender callback.",
153+
"runs_per_frame": true,
154+
"thread": "main"
155+
},
156+
{
157+
"method": "OnRenderImage",
158+
"phase": "Rendering",
159+
"description": "MonoBehaviour.OnRenderImage callback.",
160+
"runs_per_frame": true,
161+
"thread": "main"
162+
},
163+
{
164+
"method": "OnGUI",
165+
"phase": "GUI",
166+
"description": "MonoBehaviour.OnGUI callback.",
167+
"runs_per_frame": true,
168+
"thread": "main"
169+
},
170+
{
171+
"method": "OnDrawGizmos",
172+
"phase": "Editor",
173+
"description": "MonoBehaviour.OnDrawGizmos callback.",
174+
"runs_per_frame": true,
175+
"thread": "main"
176+
},
177+
{
178+
"method": "OnDrawGizmosSelected",
179+
"phase": "Editor",
180+
"description": "MonoBehaviour.OnDrawGizmosSelected callback.",
139181
"runs_per_frame": false,
140182
"thread": "main"
141183
},
142184
{
143-
"method": "OnDisable",
144-
"phase": "Decommissioning",
145-
"description": "Called when the behaviour becomes disabled. Also called when the object is destroyed or the scene is unloaded. Pair with OnEnable for event cleanup.",
185+
"method": "OnApplicationPause",
186+
"phase": "Application",
187+
"description": "MonoBehaviour.OnApplicationPause callback.",
146188
"runs_per_frame": false,
147189
"thread": "main"
148190
},
149191
{
150-
"method": "OnDestroy",
151-
"phase": "Decommissioning",
152-
"description": "Called when the MonoBehaviour is destroyed. Only called on objects that have previously been active. Used for final cleanup of resources.",
192+
"method": "OnApplicationFocus",
193+
"phase": "Application",
194+
"description": "MonoBehaviour.OnApplicationFocus callback.",
153195
"runs_per_frame": false,
154196
"thread": "main"
155197
},
156198
{
157199
"method": "OnApplicationQuit",
158-
"phase": "Decommissioning",
159-
"description": "Called before the application quits. On mobile platforms this is unreliable - use OnApplicationPause instead for save logic.",
200+
"phase": "Application",
201+
"description": "MonoBehaviour.OnApplicationQuit callback.",
160202
"runs_per_frame": false,
161203
"thread": "main"
162204
},
163205
{
164-
"method": "OnBecameVisible",
165-
"phase": "Rendering",
166-
"description": "Called when the attached Renderer becomes visible by any camera. Useful for enabling expensive per-frame logic only when visible.",
206+
"method": "OnDisable",
207+
"phase": "Decommissioning",
208+
"description": "MonoBehaviour.OnDisable callback.",
167209
"runs_per_frame": false,
168210
"thread": "main"
169211
},
170212
{
171-
"method": "OnBecameInvisible",
172-
"phase": "Rendering",
173-
"description": "Called when the attached Renderer is no longer visible by any camera. Use to disable expensive computation on off-screen objects.",
213+
"method": "OnDestroy",
214+
"phase": "Decommissioning",
215+
"description": "MonoBehaviour.OnDestroy callback.",
174216
"runs_per_frame": false,
175217
"thread": "main"
176218
}

0 commit comments

Comments
 (0)