unitybench / data /knowledge /unity6_v05.jsonl
ldh-sky's picture
Upload folder using huggingface_hub
293f2a6 verified
Raw
History Blame Contribute Delete
7.25 kB
{"id": "api-e01", "track": "api", "difficulty": "easy", "topic": "lifecycle", "type": "exact", "question": "In Unity, which MonoBehaviour message runs first: Awake or Start? Answer one word.", "answer": "Awake"}
{"id": "api-e02", "track": "api", "difficulty": "easy", "topic": "physics", "type": "exact", "question": "Which MonoBehaviour callback runs on the fixed timestep and is where Rigidbody forces should be applied? Method name only.", "answer": "FixedUpdate"}
{"id": "api-e03", "track": "api", "difficulty": "easy", "topic": "coroutine", "type": "exact", "question": "Which MonoBehaviour method starts a coroutine? Method name only.", "answer": "StartCoroutine"}
{"id": "api-e04", "track": "api", "difficulty": "easy", "topic": "coroutine", "type": "exact", "question": "Inside a coroutine, which class do you 'yield return new' to wait a number of seconds in scaled time? Class name only.", "answer": "WaitForSeconds"}
{"id": "api-e05", "track": "api", "difficulty": "easy", "topic": "components", "type": "exact", "question": "What does GetComponent<T>() return when the component is not present? One word.", "answer": "null"}
{"id": "api-e06", "track": "api", "difficulty": "easy", "topic": "editor", "type": "exact", "question": "Which preprocessor define wraps code that must compile only in the Unity Editor? Symbol only.", "answer": "UNITY_EDITOR"}
{"id": "api-e07", "track": "api", "difficulty": "easy", "topic": "physics", "type": "exact", "question": "Which 3D callback fires when a collider first enters a trigger volume? Method name only.", "answer": "OnTriggerEnter"}
{"id": "api-e08", "track": "api", "difficulty": "easy", "topic": "serialization", "type": "exact", "question": "Which attribute exposes a private field in the Inspector? Attribute name only, no brackets.", "answer": "SerializeField"}
{"id": "api-m01", "track": "api", "difficulty": "medium", "topic": "physics", "type": "regex", "question": "In a default Unity project, what is Time.fixedDeltaTime in seconds? Number only.", "answer": "^0?\\.0?2(0+)?$"}
{"id": "api-m02", "track": "api", "difficulty": "medium", "topic": "time", "type": "exact", "question": "Which Time property gives frame delta time unaffected by Time.timeScale? Property name only.", "answer": "unscaledDeltaTime"}
{"id": "api-m03", "track": "api", "difficulty": "medium", "topic": "coroutine", "type": "exact", "question": "Which yield instruction class waits until the end of the current frame, after rendering? Class name only.", "answer": "WaitForEndOfFrame"}
{"id": "api-m04", "track": "api", "difficulty": "medium", "topic": "scriptableobject", "type": "exact", "question": "Which attribute adds a ScriptableObject to the Assets > Create menu? Attribute name only, no brackets.", "answer": "CreateAssetMenu"}
{"id": "api-m05", "track": "api", "difficulty": "medium", "topic": "serialization", "type": "exact", "question": "Which attribute shows a numeric field as a slider with min/max in the Inspector? Attribute name only, no brackets.", "answer": "Range"}
{"id": "api-m06", "track": "api", "difficulty": "medium", "topic": "coroutine", "type": "exact", "question": "Inside a coroutine, 'yield return ___;' waits exactly one frame. Fill the blank with one keyword.", "answer": "null"}
{"id": "api-m07", "track": "api", "difficulty": "medium", "topic": "components", "type": "exact", "question": "Which MonoBehaviour method tries to get a component and returns a bool, avoiding a null check? Method name only.", "answer": "TryGetComponent"}
{"id": "api-t01", "track": "api", "difficulty": "trap", "topic": "physics-unity6", "type": "exact", "question": "In Unity 6, Rigidbody.velocity was renamed (the old name is deprecated). What is the new property name? Property name only.", "answer": "linearVelocity"}
{"id": "api-t02", "track": "api", "difficulty": "trap", "topic": "api-unity6", "type": "regex", "question": "In Unity 6, Object.FindObjectOfType is deprecated. Name ONE replacement method. Method name only.", "answer": "(?i)(FindFirstObjectByType|FindAnyObjectByType)"}
{"id": "api-t03", "track": "api", "difficulty": "trap", "topic": "async-unity6", "type": "regex", "question": "Which class introduced in Unity 6 enables async/await for frame/time waiting without external libraries? Class name only.", "answer": "(?i)Awaitable"}
{"id": "api-t04", "track": "api", "difficulty": "trap", "topic": "input-unity6", "type": "regex", "question": "What is the namespace of Unity's current (new) Input System package? Namespace only.", "answer": "(?i)(UnityEngine\\.)?InputSystem"}
{"id": "api-t05", "track": "api", "difficulty": "trap", "topic": "performance", "type": "exact", "question": "Which MonoBehaviour method compares a GameObject's tag without allocating, preferred over '== gameObject.tag'? Method name only.", "answer": "CompareTag"}
{"id": "bug-e01", "track": "bug", "difficulty": "easy", "topic": "performance", "type": "exact", "question": "Which per-frame callback should NOT contain heavy work like GameObject.Find? Method name only.", "answer": "Update"}
{"id": "bug-e02", "track": "bug", "difficulty": "easy", "topic": "idiom", "type": "regex", "question": "For best practice, in which callback should you cache a GetComponent result once? Method name only.", "answer": "(?i)(Awake|Start)"}
{"id": "bug-m01", "track": "bug", "difficulty": "medium", "topic": "performance", "type": "exact", "question": "To compare distances without a square-root and without GC, compare Vector3.___ instead of Vector3.Distance. Property name only.", "answer": "sqrMagnitude"}
{"id": "bug-m02", "track": "bug", "difficulty": "medium", "topic": "coroutine", "type": "regex", "question": "A running coroutine stops automatically when its GameObject becomes what? One word.", "answer": "(?i)(disabled|inactive|destroyed)"}
{"id": "bug-m03", "track": "bug", "difficulty": "medium", "topic": "csharp", "type": "exact", "question": "Modifying a List<T> while iterating it with foreach throws which exception? Exception type name only.", "answer": "InvalidOperationException"}
{"id": "bug-m04", "track": "bug", "difficulty": "medium", "topic": "events", "type": "exact", "question": "Which Unity type, assignable in the Inspector, is used instead of a C# event for designer-wired callbacks? Type name only.", "answer": "UnityEvent"}
{"id": "bug-m05", "track": "bug", "difficulty": "medium", "topic": "idiom", "type": "regex", "question": "Multiplying movement by which Time value in Update makes it frame-rate independent? Answer the Time member.", "answer": "(?i)(Time\\.)?deltaTime"}
{"id": "bug-t01", "track": "bug", "difficulty": "trap", "topic": "physics", "type": "regex", "question": "Will OnTriggerEnter fire if NEITHER of the two colliders has a Rigidbody? Answer yes or no.", "answer": "(?i)^\\s*no"}
{"id": "bug-t02", "track": "bug", "difficulty": "trap", "topic": "lifecycle", "type": "regex", "question": "Is Update() called on a MonoBehaviour whose component is disabled? Answer yes or no.", "answer": "(?i)^\\s*no"}
{"id": "bug-t03", "track": "bug", "difficulty": "trap", "topic": "serialization", "type": "exact", "question": "Which attribute prevents a PUBLIC field from being serialized by Unity? Attribute name only, no brackets or namespace.", "answer": "NonSerialized"}