I want to replace the @ signs inside the uuids

Hey there! I want to replace the @ signs inside the uuids.Because when I build my project, I get a copy error when I want to copy files to a server. I thought the solution was that these marks could be removed. But I am open to different ideas. Thanks for your help!

What server config you have and which error is reported by your server ?
Currently you can replace file name with build extension, but it will be hard to let runtime load your file correctly, I’m not sure how to do it without any issue

I don’t have any information about server. Server isn’t mine.

Are you submitting to some platform ?

yes i am trying to install the game on another platform. The problem I’m having is changing the file name with the asset id while getting build. At the end of child assets, there is a separator with the @ sign. Actually, my problem might be solved if there is no special character in the UUID.
image

I mean is this an issue because the platform doesn’t accept @ in filename or because you don’t like it ?
If it’s the platform, please let us know which platform and what’s the link of platform rules

platform rules must not include special characters in filenames. Copying fails when special characters are detected while copying cocos files.

Thanks, which platform ?

I can say platform now. Platform name is Famobi. They don’t use special chars in file names.

First, replace the ‘@’ in your file name. then you can register a custom loading pipe to handle path replacement in your game script.

cc.assetManager.transformPipeline.append((task) => {
    const input = task.output = task.input;
    for (let i = 0, l = input.length; i < l; i++) {
        const item = input[i];
        if (item.url.includes('@')) {
            item.url = item.url.replace('@', '-');
        }
    }
});

Thank you for your dedication. I will try the solution and share the result here.

thank you for your work. My problem is solved. I would like to talk about the road map to reach a solution to those who come to such a problem and want to reach a solution from here. First you need to do is create a script file in the project, paste the code here and save it.

import { _decorator, Component, Node, assetManager } from 'cc';
const { ccclass, property } = _decorator;

assetManager.transformPipeline.append((task) => {
     const input = task.output = task.input;
     for (let i = 0, l = input.length; i < l; i++) {
         const item = input[i];
         if (item.url.includes('@')) {
             item.url = item.url.replace('@', '-');
         }
     }
});

Afterwards, if you are using a windows computer after the build; Download the Microsoft PowerToys app from the Microsoft Store. Then go to the folder where you got the build, right-click the assets, go to the PowerRename option, find the @ sign, write it to replace it with the symbol you want and save it. After that, the problem will be solved.

2 Likes