Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
Hide class_name scripts in the editor.More information in README.md
Class Name Hider - Godot Addon
This addon gives you access to global scripts using the class_name keyword, while removing the unwanted behaviour of user-created nodes in the Create New Node tab.
Why
It is not very useful on its own, but it helps with this problem:
There are two ways to access the type of another script in one script.
The first is to preload the script into a constant, which makes you write preload a lot and can break because the path is hardcoded.
The second option is to use the class_name keyword. This lets you access the script type without preloading it. However, it makes the Create New Node tab cluttered, slows it down, and if the script only works in a specific scene, it will not load the scene when added with the Create New Node tab. Instead, it will add a new node with only the script attached to it.
Note
- Note that this addon only hides the nodes in the
Create New Nodetab, it does not disable/remove them. - The addon assumes that your scripts are in snake_case and the class_name name is the name of the script in PascalCase. (e.g. my_script.gd -> class_name MyScript)
- This addon is primarily intended for users who use the static typing (because duck typing is used with dynamic typing)
Installation
- Download the addon from GitHub or AssetLib.
- Copy the addons folder into your project if you downloaded it from GitHub.
- Enable the addons in your project settings.
- By default, the addon hides all user-created scripts with the
class_namekeyword. To keep custom scripts in theCreate New Nodetab, add the folders name containing the scripts to theclass_name_hider/excluded_folderssettings. - Click on the button
Project > Tools > Generate class_name Hider Profile. - Add the generated profile to the
Editor > Manage Editor Features..., click on theImportbutton and select thehider_script.profile. Click onMake currentif necessary.
The class that is hidden from the editor is in the `disabled_classes' array of the profile.
If you have any trouble:
- After adding excluded folders the tools may not be actualised, if the profile file still has excluded folder's script, try generating it again.
- After generating a profile, try removing all profiles from the Manage Editor Features window and re-importing the profile.
License
This project is licensed under the terms of the Mozilla Public License, version 2.0.
Hide class_name scripts in the editor.
More information in README.md
Reviews
Quick Information
Hide class_name scripts in the editor.More information in README.md