You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Convenience funcrion to try to delete a problematic shader from a 2D canvas object (like a rectangle on the screen), may cause game crashes if game code depends on setting variables in the shader
# Convenience function to completely remove a potential problematic material from a mesh. May have unintended consequences or create unwarranted visual artifacts.
# Convenience function to completely remove a potential problematic material from a 2D item (like a UI item). May have unintended consequences or create unwarranted visual artifacts.
# Convenience function to hide a node. May need to be run in _process if other game code may dynamically hide and show the element
148
182
funchide_node(node : Node) ->void:
149
183
ifnode.has_method("hide"):
150
184
node.hide()
151
185
else:
152
186
forproperty_dictionaryinnode.get_property_list():
153
-
if"visible"inproperty_dictionary.name:
187
+
if"visible"inproperty_dictionary["name"]:
154
188
node.visible=false
155
189
break
156
190
157
191
# Convenience function to show a hidden node. May need to be run in _process if other game code may dynamically hide and show the element
158
192
funcshow_node(node : Node) ->void:
159
-
node.show()
160
-
node.visible=true
161
193
ifnode.has_method("show"):
162
194
node.show()
163
195
else:
164
196
forproperty_dictionaryinnode.get_property_list():
165
-
if"visible"inproperty_dictionary.name:
197
+
if"visible"inproperty_dictionary["name"]:
166
198
node.visible=true
167
199
break
168
200
201
+
# Convenience function to print a scene tree of the scene at the time the function is called to the existing log for the game
202
+
# The log is usually found in Users/userscomputername/AppData/Roaming/Godot/app_userdata/game_name, but some games maintain their user data with logs in other folders
203
+
# This can be used to find potential nodes for reparenting, adjusting shaders, etc., without having to try to decompile the flat screen game
204
+
funcprint_scene_tree_pretty_to_game_log() ->void:
205
+
get_tree().current_scene.print_tree_pretty()
206
+
207
+
# Convenience function to print a scene tree of the scene at the time the function is called to a text file dedicated to this purpose in the XRConfigs folder. Note that by default the file does NOT clear. Set to true instead when calling the function to just print the latest scene tree to the file.
208
+
# This can be used to find potential nodes for reparenting, adjusting shaders, etc., without having to try to decompile the flat screen game
0 commit comments