Hey guys!
I would like to ask you if it’s possible to add ‘regions’ in the playground like:
#region CameraStuff
//foldable camera code..
#endregion
In general the use of regions are arguable, but I see potential to fold some repetitive codeparts like the initialisation of the camera and so on…It could also help if shared examples in the forum are prefolded, so that users can focus on the part that matters.
(if there is a way to access ‘regions’ allready, I am sorry that I was not able to use them)
1 Like
Hey
nope this is not something we support
1 Like
Hey!
Well does it mean ‘still not supporting’ or ‘we will not support it in the future’ ?
Hi, is regions just to hide code?
We componetize under a namespace with function.
createSomething.
Inside fx.ui.createSomething = function(){}
gives the ability to do something similar…
: )
Hey nice infos! Thanks!
Well regions are more for collapsing the code into a comment and not just hiding it
They are also arguable a bit smelly, but I use them kinda often in WPF where you need a lot of lines for some properties and like the focus they give me on the relavant code…
Did not know about pbt.hideLines(); which is also nice for showing just the important informations!
We allready have the possibilty to (un)fold functions in the PG, which is pretty nice…
@aFalcon sorry I was not able to resolve your tip
I am still a newbie
Here an example regarding your question:
(taken from https://marketplace.visualstudio.com/items?itemName=MadsKristensen.JavaScriptRegions)

And here collapsed:

1 Like
So this is something supported by our code editor but I did not find time to dig into it yet 