godotengine / godotengine/godot-docs

Better document that builtins with the return type "flags" are BitFields, not enums, and document what BitFields actually are and how to use them in gdscript

Open
#11,021 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

**Your Godot version:**
4.4.1

**Issue description:**
GlobalScope docs page (both online and in editor) is missing the PropertyUsageFlags entry for 4102 which is for script @export vars, which I was only able to figure out the flag for by print()ing an object's get_property_list()

I also discovered 135168, also not in the docs, which is less clear what it is, but from experimentation I think appears to be used for untyped non-exported script vars (static typed non-exported script vars show as 4096, which is listed in the docs but claims to be for all script vars)

edit: apparently these flags returned by get_property_list() are not enums at all like I'd assumed, but are actually bit fields, a data type that I have never seen before and isn't documented anywhere in gdscript

**URL to the documentation page:**
https://docs.godotengine.org/en/latest/classes/class_%40globalscope.html#enum-globalscope-propertyusageflags

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.