Skip to content

Instantly share code, notes, and snippets.

@GreenCrowDev
GreenCrowDev / godot_gdextension_beginners_001.md
Last active May 3, 2024 14:15
Godot 4 GDExtension plugin development for beginners [Part 1]

Typing SVG

I'm on X (formerly Twitter) Follow and YouTube Channel Subscribers , anyone is welcome: feel free to get in contact if you need any help!
If you appreciate my work, consider buying me a coffee and help me go full-time!

@Gnumaru
Gnumaru / GdscriptCallSequence.txt
Last active March 19, 2024 03:00
The sequence in which methods and signals gets called in gdscript
# as of godot 4.1
_static_init
_init
_notification 20 Node.NOTIFICATION_SCENE_INSTANTIATED # only on instantiated scene roots
_notification 18 Node.NOTIFICATION_PARENTED
_enter_tree
tree_entered signal
_notification 27 Node.NOTIFICATION_POST_ENTER_TREE
_ready
ready signal
@YuriSizov
YuriSizov / ResourceUtils.gd
Last active April 15, 2024 10:29
Busting Godot resource cache
extends Object
class_name ResourceUtils
# ResourceLoader is unreliable when it comes to cache.
# Sub-resources get cached regardless of the argument passed to load function.
# This is a workaround that generates a new file on a fly,
# while making sure that there is no cache record for it.
# This file is then used to load the resource, after which
# the resource takes over the original path.
static func load_fresh(resource_path : String) -> Resource:
@me2beats
me2beats / plugin.gd
Created July 5, 2021 18:33
Toggle expand bottom panel from plugin (hacky)
tool
extends EditorPlugin
func _enter_tree():
var base = get_editor_interface().get_base_control()
var expand_button:ToolButton = get_expand_bottom_panel_button(base)
expand_button.pressed = not expand_button.pressed
@cenullum
cenullum / circle.shader
Created October 18, 2020 16:30
Godot Engine Circle with Outline Color Shader
shader_type canvas_item;
uniform vec4 outline_color:hint_color = vec4(1.0,1.0,0.0,1.0);
uniform float inner_circle=0.45;
uniform float outer_circle=0.5;
const vec4 alpha_color= vec4(0,0,0,0);
uniform float smoothness=0.01;
@me2beats
me2beats / main.gd
Last active April 21, 2022 15:16
godot get custom classes
func get_custom_classes():
#gets list of "custom" classes (defined using class_name keyword)
var find_this = "_global_script_classes="
var custom_classes_lines = PoolStringArray()
var f = File.new()
f.open("res://project.godot", File.READ)
var add_lines = false
@blackcater
blackcater / diagrams.md
Created July 6, 2018 16:45
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

@MeFoDy
MeFoDy / DailyCssImages.md
Last active September 11, 2023 12:48
Daily CSS Images: full list of tasks

Daily CSS Images

Week 1

Day 1. Bear Cub

The challenge begins! Don't overthink it. A cub can be made in only a few shapes.

Day 2. Elephant

@aaossa
aaossa / README.md
Created October 1, 2017 19:28
Cómo trabajar con git branches

Workflow con git

Para este proyecto seguiremos la metodología de tener una branch principal master (equivalente a release en otros proyectos), una branch dev (o development) para comprobar que todo funcione antes de enviar los cambios a master y múltiples "feature branches" para que cada colaborador pueda enacrgarse de una tarea definida, trabajarla y probarla a gusto antes de reunir los cambios en dev. Para más detalle y ejemplos pueden usar de esta lectura la sección Feature Branch Workflow.

From: https://www.atlassian.com/pt/git/workflows

Pasos para empezar a trabajar en una feature