If you find your GDScript code in need of organization, you can use code regions to collapse sections of it! Use #region NAME above the block and then put #endregion at the end of the block to conveniently help focus it down.
#godot #godotengine #tipthursday #gamedev
me: *types #region*
JetBrains Rider:
💡 HEY
this #region
🐉🐉🐉🐉
🐉
🐉 [this region is empty]
🐉
#endregion is empty??
🐉🐉🐉🐉🐉🐉🐉🐉
yo ugonna write something or what ℹ️
🐉🐉🐉🐉🐉🐉🐉🐉🐉🐉🐉🐉🐉
Using #region / #endregion in C# code
Forgive me, for I have sinned.
Today, I used
#region
...
#endregion
in my code.
The closest thing is #region and #endregion tags. I was just talking with another dev about how hard this was to adjust to when we switched over
Region Viewer extension panel in VS Code showing the outline of #region areas in a CSS file, with light and dark mode override regions nested by browser
Doc Brown: "Roads? Where we're going, we don't need roads"
Files? Where we're going, we don't need files
#region / #endregion could stop being one of the lazy coder's best-kept secrets if VS Code's default Outline panel supported it
Daily Godot Tip #39: You can create code regions between #region and #endregion that allow you to collapse that entire section into 1 line
Useful for things you don't edit but still would need to scroll past
#godot #gamedev #godottips
dev tip: Si deseas agrupar secciones de código de Javascript en Visual Studio Code como se hace en Visual Studio entonces usa las directivas // #region y // #endregion
1: I have a joke about legacy code
2:
3: #region setup
840: #endregion
841:
842: #region punchline
1030: #endregion
1031:
1032: return laughs;
#region
Just say no
#endregion