Convert a generated controller
Notes for emulator developers replacing a controller that code generates with a 2.0 source. Skin authors don't need this page: start with the tutorial.
- Keep a classic baseline. Save the current
info.jsonand screenshots for each supported orientation. Note the input names, touch extensions and game-screen frames. - Separate artwork and controls. Model the game viewport as a
screenand each input as acontrolor a standard part. Put reusable artwork in parts and shared colors in tokens. - Replace canvas constants with constraints. Anchor clusters to the safe area, let their children use local frames and use
whenfor layouts that genuinely differ by orientation. - Check capabilities and hit frames. Declare the features used in
requires. Preview portrait and landscape in the playground with Guides on and check that interactive regions do not overlap. - Bake and compare. Produce the complete classic archive, compare it to the baseline and test installation in each consumer before replacing bundled defaults.
Contribute a renderer fixture
Add the source under Tests/Format2Fixtures/ in SkinKit. Record the layout and image references, review the generated files and rerun without recording enabled.
SKIN2_RECORD=1 xcrun swift test --filter SkinKit2CoreTests
SKIN2_RECORD=1 xcrun swift test --filter SkinKit2RenderTests
xcrun swift test
After the SkinKit change merges, use tests/skin2/vendor-fixtures.mjs in the skins checkout to refresh the shared fixture copy. The renderer parity workflow checks the vendored files against SkinKit main.