Mar
6
2024

Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)

Steps

  • Customize your project template package.json file (using 7zip in Administrator mode)
  • Project templates are inside Unity editor installation folder (like: 2022_3\Editor\Data\Resources\PackageManager\ProjectTemplates\)
  • Example package.json here to add video (and hide default preview image)
    https://gist.github.com/unitycoder/cc472faec83f4941d032e2010ce889ea
  • Remember to close Hub completely (so that it reloads packages)
  • Whats happening? This line has HTML & CSS inside description and Unity hub renders them.. The CSS is for hiding default project template thumbnail.
    "description": "Some description here.. <video width='320' height='240' autoplay style=''><source src='https://cdn.mtdv.me/video/rick.mp4' type='video/mp4'></video><style>.template-preview__image{display:none !important;}</style>",

WARNING!

  • This means, if you download custom project templates from web/unknown sources, they might “call home” with custom html running on template selection.. (capture your IP address or possible more..) **I did report this to Unity Bug Bounty earlier, but got reply that its not applicable..

VIDEO

forum post:
https://forum.unity.com/threads/workaround-custom-icon-and-preview-image-for-your-new-project-templates.1554800/


Leave a comment

Connect

Twitter View LinkedIn profile Youtube Github Join Discord Twitch Instagram BlueSky

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.