e2afe700f6
This source generator adds a newly introduced attribute, `ScriptPath` to all classes that: - Are top-level classes (not inner/nested). - Have the `partial` modifier. - Inherit `Godot.Object`. - The class name matches the file name. A build error is thrown if the generator finds a class that meets these conditions but is not declared `partial`, unless the class is annotated with the `DisableGodotGenerators` attribute. We also generate an `AssemblyHasScripts` assembly attribute which Godot uses to get all the script classes in the assembly, eliminating the need for Godot to search them. We can also avoid searching in assemblies that don't have this attribute. This will be good for performance in the future once we support multiple assemblies with Godot script classes. This is an example of what the generated code looks like: ``` using Godot; namespace Foo { [ScriptPathAttribute("res://Player.cs")] // Multiple partial declarations are allowed [ScriptPathAttribute("res://Foo/Player.cs")] partial class Player {} } [assembly:AssemblyHasScripts(new System.Type[] { typeof(Foo.Player) })] ``` The new attributes replace script metadata which we were generating by determining the namespace of script classes with a very simple parser. This fixes several issues with the old approach related to parser errors and conditional compilation. It also makes the task part of the MSBuild project build, rather than a separate step executed by the Godot editor. |
||
---|---|---|
.github | ||
core | ||
doc | ||
drivers | ||
editor | ||
main | ||
misc | ||
modules | ||
platform | ||
scene | ||
servers | ||
tests | ||
thirdparty | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.mailmap | ||
AUTHORS.md | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
COPYRIGHT.txt | ||
DONORS.md | ||
glsl_builders.py | ||
icon.png | ||
icon.svg | ||
LICENSE.txt | ||
logo.png | ||
logo.svg | ||
LOGO_LICENSE.md | ||
methods.py | ||
platform_methods.py | ||
README.md | ||
SConstruct | ||
version.py |
Godot Engine
2D and 3D cross-platform game engine
Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported in one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms (HTML5) and consoles.
Free, open source and community-driven
Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.
Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.
Getting the engine
Binary downloads
Official binaries for the Godot editor and the export templates can be found on the homepage.
Compiling from source
See the official docs for compilation instructions for every supported platform.
Community and contributing
Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.
To get in touch with the engine developers, the best way is to join the #godotengine-devel IRC channel on Freenode.
To get started contributing to the project, see the contributing guide.
Documentation and demos
The official documentation is hosted on ReadTheDocs. It is maintained by the Godot community in its own GitHub repository.
The class reference is also accessible from the Godot editor.
The official demos are maintained in their own GitHub repository as well.
There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more information.