Saturday, January 10, 2026

[Cat Q&A] Development Notes 1

[貓咪問答]開發筆記1

*Content generated by AI.

1. Mobile UI Layout Practices

Optimized the visual experience for 1080 x 1920 resolution to ensure seamless display on mobile devices:   

  • Question Display Settings: Utilized TextMeshPro for question text with a defined width of 900–1000. Enabled the Auto Size feature to ensure questions of varying lengths remain legible within the designated area.  

  • Progress Bar Optimization: Implemented the Slider component and removed the Handle Slide Area to achieve a modern, minimalist progress indicator.  

  • Auto-Layout Techniques: Applied "Stretch" anchor settings to both the progress bar background and fill area, allowing child objects to automatically scale and fill their parent containers.   

2. Structured Question Bank

Separated game content from core logic to improve management efficiency:   

  • JSON Integration: Developed a JSON-based question bank containing 20 cat-themed trivia questions, including question strings, option arrays, and correct answer indices.   

  • Automated Resource Management: Stored question files in the Resources folder, enabling dynamic loading via code during runtime.   

3. Core Logic & Scripting

Developed the game’s central control system within the Unity 6 environment:  

  • QuizManager Script: Implemented core functionalities including data loading, randomized question shuffling, button event binding, and real-time progress bar updates.   

  • Data Parsing Solutions: Designed a QuestionWrapper class to act as a container, overcoming the native JsonUtility limitation where arrays cannot be parsed directly from the root.   

  • Scene Integration: Established a GameManager empty object to serve as the "brain," linking all UI elements (Text, Buttons, Sliders) through the Inspector panel.   



探索更多 / Explore More

古箏練習紀錄 | Guzheng Practice

繪圖練習紀錄 | Digital Art Practice

關於我 | About Me

No comments:

Post a Comment