7
2023
UnityHub: Add support for custom project title (instead of folder name) or use ProductName
This request has been open since 2018..
https://forum.unity.com/threads/renaming-projects.514061/
So had to test it myself and seems to be really simple
(*** as a proof of concept, i don’t know it the Title value affects something else)
Steps:
- Unpack app.asar from Hub folder (using 7zip Asar plugin https://www.tc4shell.com/en/7zip/asar/ or python script https://github.com/unitycoder/UnityHubPatcher )
- rename old app.asar as app.asar.bak
- Open app/ folder in VSCode/VSStudio (need to run as an Admin)
- Open localProject.js
- Add this line at top (near other definitions)
const kPCustomNamePath = path.join(ProjectSettingsFolderPath, ‘ProjectName.txt’); - modify getProjectData(projectPath) method
- Add these lines of code (inside green rectangles)

- Open projectDataHelpers.js
- Add these lines at the end
exports.getCustomProjectName = getCustomProjectName;
async function getCustomProjectName(customNamePath, defaultName) {
try {
const customName = await fileSystem_1.fs.readFile(customNamePath, ‘utf8’);
return customName.trim();
} catch (error) {
return defaultName;
}
} - Make sure Hub process is closed completely (not minimized)
- Save script changes
- You can now add ProjectName.txt file inside Project settings to some of your projects to test it
- Start hub again, if everything is correct, it should display custom title for that project

So then it uses same ProjectName.txt file like my custom launcher (which allows project rename with F2)
https://github.com/unitycoder/UnityLauncherPro
UPDATE 19.12.2023, you can add support for reading ProjectSettings Product Name field also, use this for the getCustomProjectName method:
exports.getCustomProjectName = getCustomProjectName;
async function getCustomProjectName(customNamePath, defaultName) {
try {
// if ProjectName.txt exists
const customName = await fileSystem_1.fs.readFile(customNamePath, 'utf8');
return customName.trim();
} catch (error) {
}
try {
// try to read ProjectSettings.asset next
let settingsFilePath = customNamePath.replace("ProjectName.txt",""+"/ProjectSettings.asset");
console.log(settingsFilePath);
const settingsNameRaw = await fileSystem_1.fs.readFile(settingsFilePath, 'utf8');
const settingsName = settingsNameRaw.match(/productName: (.*)/)[1];
return settingsName.trim();
} catch (error) {
//console.log(error.Error);
}
return defaultName;
}
*08.12.2023 Generic disclaimer: For Education Purposes Only.
Related Posts
Leave a comment
Recent posts
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
- Convert LAS/LAZ/PLY pointclouds to GLTF (GLB) Point Meshes (standalone converter)
Recent Comments
- on Mesh Exploder (sources)
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by











