Glyph images are registered in the InputGlyphTextureMap
asset, and in most cases, you can use them without any modifications. This page guides you through the steps to add button images that are not in the default or to change existing images.
First, let’s explain how glyph images are registered in the Input Glyphs package.
Buttons and glyph images are linked with the xxxGlyphTextureMap
asset located in InputGlyphs/Data/
. Enter the Control name defined by the Input System in InputLayoutLocalPath
and the actual image reference in GlyphTexture
. You can check the Control name in the Name column of the Input Debugger window.
Each device and the xxxGlyphTextureMap
asset are linked in the InputGlyphsSetup
prefab. By assigning the xxxGlyphTextureMap
asset to components such as KeyboardGlyphInitializer
, Input Glyphs can search for glyph images from the device and button information.
Make sure to enable Read/Write for the import settings of glyph images.
As an example, here are the steps to add keyboard glyphs.
Assets > Create > InputGlyphs > InputGlyphTextureMap
to create an asset.+
button on the list of the created asset.InputLayoutLocalPath
and the image you want to add in GlyphTexture
.+
button on the list of the KeyboardGlyphInitializer
component of the InputGlyphsSetup
prefab placed in the scene.As an example, here are the steps to change keyboard glyphs.
InputGlyphs/Data/KeyboardAlphabetGlyphTextureMap
to your project. (Ctrl+drag, etc.)GlyphTexture
of the duplicated asset with the image you want to change.KeyboardGlyphInitializer
component of the InputGlyphsSetup
prefab placed in the scene with the duplicated asset.