unitybench / data /knowledge /unity6_v1_extra.jsonl
ldh-sky's picture
Upload folder using huggingface_hub
293f2a6 verified
Raw
History Blame Contribute Delete
10.6 kB
{"id": "api-t11", "track": "api", "difficulty": "trap", "topic": "physics-unity6", "type": "exact", "question": "In Unity 6, Rigidbody.drag was renamed to what? Property name only.", "answer": "linearDamping"}
{"id": "api-t12", "track": "api", "difficulty": "trap", "topic": "physics-unity6", "type": "exact", "question": "In Unity 6, Rigidbody.angularDrag was renamed to what? Property name only.", "answer": "angularDamping"}
{"id": "api-t13", "track": "api", "difficulty": "trap", "topic": "api-unity6", "type": "regex", "question": "In Unity 6, FindObjectOfType (singular) is deprecated. What is the replacement that returns the FIRST match? Method name only.", "answer": "(?i)FindFirstObjectByType"}
{"id": "api-t14", "track": "api", "difficulty": "trap", "topic": "async-unity6", "type": "regex", "question": "In Unity 6, which awaitable type lets you 'await' the next frame instead of using a coroutine? Type name only.", "answer": "(?i)Awaitable"}
{"id": "api-t15", "track": "api", "difficulty": "trap", "topic": "null-unity", "type": "regex", "question": "Does the C# null-conditional operator (obj?.member) correctly respect Unity's overridden null check for a Destroyed object? Answer yes or no.", "answer": "(?i)^\\s*no"}
{"id": "api-t16", "track": "api", "difficulty": "trap", "topic": "input-unity6", "type": "exact", "question": "With the new Input System, which Keyboard key property is true only on the frame the key went down? Property name only.", "answer": "wasPressedThisFrame"}
{"id": "api-t17", "track": "api", "difficulty": "trap", "topic": "pooling-unity6", "type": "regex", "question": "Which generic class in UnityEngine.Pool provides a ready-made object pool? Class name only.", "answer": "(?i)ObjectPool"}
{"id": "api-t18", "track": "api", "difficulty": "trap", "topic": "lifecycle", "type": "regex", "question": "Does Time.timeScale = 0 pause a coroutine's 'yield return new WaitForSeconds(1f)'? Answer yes or no.", "answer": "(?i)^\\s*yes"}
{"id": "api-t19", "track": "api", "difficulty": "trap", "topic": "transform", "type": "regex", "question": "Can you compile 'transform.position.x = 5f;' directly in Unity C#? Answer yes or no.", "answer": "(?i)^\\s*no"}
{"id": "api-t20", "track": "api", "difficulty": "trap", "topic": "api-unity6", "type": "regex", "question": "In Unity 6, FindObjectOfType that returns ANY match (cheaper, no sorting) is called what? Method name only.", "answer": "(?i)FindAnyObjectByType"}
{"id": "bug-t09", "track": "bug", "difficulty": "trap", "topic": "null-unity", "type": "regex", "question": "Is it safe to use the C# null-coalescing operator (??) with a UnityEngine.Object reference? Answer yes or no.", "answer": "(?i)^\\s*no"}
{"id": "bug-t10", "track": "bug", "difficulty": "trap", "topic": "physics", "type": "regex", "question": "For OnTriggerEnter to fire, at least one of the colliders must have which boolean enabled? Property name only.", "answer": "(?i)(isTrigger|trigger)"}
{"id": "bug-t11", "track": "bug", "difficulty": "trap", "topic": "physics", "type": "regex", "question": "Does OnCollisionEnter fire when BOTH colliders are marked isTrigger? Answer yes or no.", "answer": "(?i)^\\s*no"}
{"id": "bug-t12", "track": "bug", "difficulty": "trap", "topic": "performance", "type": "regex", "question": "To compare two distances without a square root, compare which Vector3 property instead of magnitude? Property name only.", "answer": "(?i)sqrMagnitude"}
{"id": "bug-t13", "track": "bug", "difficulty": "trap", "topic": "csharp", "type": "regex", "question": "Is UnityEngine.Vector3 a class or a struct? One word.", "answer": "(?i)struct"}
{"id": "api-e15", "track": "api", "difficulty": "easy", "topic": "coroutine", "type": "regex", "question": "How long does 'yield return null' pause a coroutine? Short answer.", "answer": "(?i)(one frame|1 frame|a frame|single frame|next frame|one|frame)"}
{"id": "api-e16", "track": "api", "difficulty": "easy", "topic": "debug", "type": "regex", "question": "Which call logs a WARNING to the Unity Console? Answer Class.Method.", "answer": "(?i)Debug\\.LogWarning"}
{"id": "api-e17", "track": "api", "difficulty": "easy", "topic": "scene", "type": "regex", "question": "Which namespace contains SceneManager? Answer the namespace.", "answer": "(?i)UnityEngine\\.SceneManagement"}
{"id": "api-e18", "track": "api", "difficulty": "easy", "topic": "assets", "type": "exact", "question": "Which base class do you derive from for a data-container asset (not attached to a GameObject)? Class name only.", "answer": "ScriptableObject"}
{"id": "api-e19", "track": "api", "difficulty": "easy", "topic": "lifecycle", "type": "exact", "question": "Which callback runs every fixed physics step? Method name only.", "answer": "FixedUpdate"}
{"id": "api-m15", "track": "api", "difficulty": "medium", "topic": "components", "type": "exact", "question": "Which method returns a component via an out parameter and a bool success? Method name only.", "answer": "TryGetComponent"}
{"id": "api-m16", "track": "api", "difficulty": "medium", "topic": "layers", "type": "regex", "question": "Which LayerMask static method converts a layer name string to its integer index? Answer Class.Method or method name.", "answer": "(?i)(LayerMask\\.)?NameToLayer"}
{"id": "api-m17", "track": "api", "difficulty": "medium", "topic": "coroutine", "type": "exact", "question": "Which yield instruction class waits until the end of the current frame? Class name only.", "answer": "WaitForEndOfFrame"}
{"id": "api-m18", "track": "api", "difficulty": "medium", "topic": "math", "type": "exact", "question": "Which Mathf method clamps a float into the 0..1 range? Method name only.", "answer": "Clamp01"}
{"id": "api-m19", "track": "api", "difficulty": "medium", "topic": "math", "type": "exact", "question": "Which Quaternion static property is the no-rotation identity? Property name only.", "answer": "identity"}
{"id": "api-m20", "track": "api", "difficulty": "medium", "topic": "random", "type": "regex", "question": "Which UnityEngine.Random member returns a float in [0,1]? Answer Class.member or member.", "answer": "(?i)(Random\\.)?value"}
{"id": "api-m21", "track": "api", "difficulty": "medium", "topic": "editor", "type": "exact", "question": "Which MonoBehaviour callback runs in the editor when a serialized value is changed in the Inspector? Method name only.", "answer": "OnValidate"}
{"id": "api-m22", "track": "api", "difficulty": "medium", "topic": "coroutine", "type": "exact", "question": "What is the return type of a coroutine method in Unity? Type name only.", "answer": "IEnumerator"}
{"id": "api-m23", "track": "api", "difficulty": "medium", "topic": "serialization", "type": "regex", "question": "Which attribute keeps a field's serialized data after you rename it in code? Attribute name only.", "answer": "(?i)FormerlySerializedAs"}
{"id": "api-m24", "track": "api", "difficulty": "medium", "topic": "math", "type": "exact", "question": "Which Vector3 static method returns the linear interpolation between two points? Method name only.", "answer": "Lerp"}
{"id": "api-m25", "track": "api", "difficulty": "medium", "topic": "components", "type": "exact", "question": "Which attribute auto-adds a required component to a GameObject when the script is added? Attribute name only.", "answer": "RequireComponent"}
{"id": "bug-e05", "track": "bug", "difficulty": "easy", "topic": "csharp", "type": "exact", "question": "Which C# keyword declares a compile-time constant? Keyword only.", "answer": "const"}
{"id": "bug-e06", "track": "bug", "difficulty": "easy", "topic": "components", "type": "regex", "question": "What does GetComponent<T>() return if the component is not present? One word.", "answer": "(?i)^\\s*null"}
{"id": "bug-e07", "track": "bug", "difficulty": "easy", "topic": "csharp", "type": "exact", "question": "Which C# keyword makes a field assignable only in its declaration or constructor? Keyword only.", "answer": "readonly"}
{"id": "bug-m11", "track": "bug", "difficulty": "medium", "topic": "performance", "type": "regex", "question": "Using LINQ (e.g. .Where().ToList()) inside Update each frame mainly risks what? One or two words.", "answer": "(?i)(gc|garbage|allocation|alloc)"}
{"id": "bug-m12", "track": "bug", "difficulty": "medium", "topic": "performance", "type": "regex", "question": "Which is the more efficient tag check: CompareTag or comparing gameObject.tag with ==? Answer the method name.", "answer": "(?i)CompareTag"}
{"id": "bug-m13", "track": "bug", "difficulty": "medium", "topic": "performance", "type": "regex", "question": "Boxing a struct (e.g. storing an int in an object) on the hot path causes what? One or two words.", "answer": "(?i)(gc|garbage|allocation|alloc|boxing)"}
{"id": "bug-m14", "track": "bug", "difficulty": "medium", "topic": "idiom", "type": "regex", "question": "To cache a GetComponent result so it is not fetched every frame, you typically do it in which callback? One method name.", "answer": "(?i)(awake|start)"}
{"id": "bug-m15", "track": "bug", "difficulty": "medium", "topic": "csharp", "type": "regex", "question": "Which attribute marks an enum as a bit-flags combination? Attribute name only.", "answer": "(?i)Flags"}
{"id": "bug-m16", "track": "bug", "difficulty": "medium", "topic": "events", "type": "regex", "question": "Forgetting to unsubscribe from a C# event before an object is destroyed can cause what? Two words.", "answer": "(?i)(memory leak|leak)"}
{"id": "bug-m17", "track": "bug", "difficulty": "medium", "topic": "idiom", "type": "regex", "question": "Which operator should you NOT use to null-check a possibly-Destroyed Unity Object: == null, or ?. ? Answer the unsafe one.", "answer": "(?i)(\\?\\.|null-conditional|null conditional)"}
{"id": "bug-m18", "track": "bug", "difficulty": "medium", "topic": "csharp", "type": "exact", "question": "Which C# operator gets a member's name as a string at compile time? Operator/keyword only.", "answer": "nameof"}
{"id": "api-e20", "track": "api", "difficulty": "easy", "topic": "lifecycle", "type": "exact", "question": "Which callback runs once after all Update calls each frame? Method name only.", "answer": "LateUpdate"}
{"id": "api-e21", "track": "api", "difficulty": "easy", "topic": "transform", "type": "exact", "question": "Which Transform method makes it face a target position? Method name only.", "answer": "LookAt"}
{"id": "api-e22", "track": "api", "difficulty": "easy", "topic": "components", "type": "exact", "question": "Which method adds a component of a given type to a GameObject at runtime? Method name only.", "answer": "AddComponent"}