[CC 3.X.X] - How to extend the inspector?

Hello,

Looks like a lot has change in CC 3.XX architecture.
I noticed that the @inspector decorator is not working in the way that 2.XX does.

Unfortunately, there are NO documentation to such an important thing.
I really need assist here… Is someone here managed to extend component properties with the @inspector? @slackmoehrle

Please help…

I’ll ask the team for thoughts.

Just need a working demo with only one property.
I will take it from there.

Note:

Hi again… any news?

I’m talking with the team. Stay tuned please. :slight_smile:

@inspector has not been used in version 3.x versions.

You can access /Applications/coccuscreator/creator/3.1.0/cocoscreator.app/contents/resources/resources/3d/Engine/Editor/inspector path, you can customize the script here.

There is currently no documentation to introduce usage, follow-up we will provide.

There is also the same reply in the Chinese Forum:

Thank you… (and you too @slackmoehrle)

So I managed to get control over the inspector now and it looks ok.
However, I need to go to the specified folder and under ‘components.js’ file I need to register a new js file on my own. Is there a way to register a new inspector class from the game project?

// Is the following code can be done on the game project side instead of the engine itself?
{
    '[MyClassName]': join(__dirname, './components/[MyNewInspectorFileName].js')
}