This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example script for adding extra animation data based on GLTF custom attributes | |
# added in Blender when importing into Godot using GLTFDocumentExtension. | |
# (This example depends on other scripts not included here so it doesn't run on its own.) | |
extends GLTFDocumentExtension | |
const FPS = 60.0 | |
func _import_preflight(state: GLTFState, extensions: PackedStringArray) -> Error: | |
if not state.json.has(&"animations"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Node | |
## Mod Loader | |
## | |
## Add this as the very first autoload in your project settings. | |
const MODS_PATH = &"user://mods" | |
const MODLIST_PATH = "user://modlist.cfg" | |
const MODS_SECTION = &"Load mods" | |
var da: DirAccess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tool # <- This is important, only works in tool scripts | |
extends Node | |
## Nested enum example | |
## | |
## Quickly hacked together example for how one could expose a different "sub" enum variable | |
## depending on the value of a "main" enum. | |
# Main enum | |
enum MainClass { |