PageSourceSearch

https://nathanhoad.net/addons

html nathanhoad.net collected 2026-10-04 00:22:09 UTC 8,049 bytes, 76 lines download raw bytes

1<!doctype html>
2<html lang="en">
3	<head>
4		<meta charset="utf-8" />
5		<meta name="viewport" content="width=device-width, initial-scale=1" />
6		<style>
7			html,
8			body {
9				margin: 0;
10				padding: 0;
11			}
12
13			* {
14				box-sizing: border-box;
15			}
16
17			:root {
18				--font-sans: system-ui, sans-serif;
19				--font-serif: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
20			}
21		</style>
22		<link href="./_app/immutable/entry/start.BYUHqmMK.js" rel="modulepreload">
23		<link href="./_app/immutable/chunks/BzW0QHTq.js" rel="modulepreload">
24		<link href="./_app/immutable/chunks/D5qtAW-j.js" rel="modulepreload">
25		<link href="./_app/immutable/entry/app.CcNnKQ-e.js" rel="modulepreload">
26		<link href="./_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
27		<link href="./_app/immutable/nodes/0.CErJ6NkN.js" rel="modulepreload">
28		<link href="./_app/immutable/nodes/4.BquMymSv.js" rel="modulepreload">
29		<link href="./_app/immutable/chunks/D4900IF7.js" rel="modulepreload">
30		<link href="./_app/immutable/chunks/ZBi06qxW.js" rel="modulepreload">
31		<!--12qhfyh--><link rel="icon" href="/_app/immutable/assets/favicon.xvLOrXnq.png"/><!----><!--1v3yl8f--><meta property="og:title" content="Godot Editor addon considerations"/> <meta name="description" content="I've made a few Godot addons so here's a list of general things I think about when building them."/> <meta property="og:description" content="I've made a few Godot addons so here's a list of general things I think about when building them."/> <meta property="og:image" content="https://nathanhoad.net/share.jpg"/> <meta property="og:url" content="https://nathanhoad.net/addons"/> <link type="image/png" href="/favicon.png" rel="icon"/> <meta name="author" content="Nathan Hoad"/> <meta name="verify-v1" content="FJjra037EqYRGo8w0Atq5BHkBi8B+MPZSD+0jKQebLs="/> <meta name="p:domain_verify" content="5c8fe00840c14d6c92865fc017137b69"/><!----><title>Godot Editor addon considerations</title>
32		<link href="./_app/immutable/assets/footer.CdW35QaD.css" rel="stylesheet">
33		<link href="./_app/immutable/assets/article-page.ac_ksS3b.css" rel="stylesheet">
34	</head>
35
36	<body data-sveltekit-preload-data="hover">
37		<div style="display: contents"><!--[--><!--[0--><!--[--><!--[--><!----> <header class="svelte-owee86"><strong class="svelte-owee86"><a href="/" class="svelte-owee86">Nathan Hoad</a></strong> <aside class="svelte-owee86"><a href="https://youtube.com/@nathan_hoad" class="svelte-owee86"><img src="/youtube-light.svg" alt="YouTube" width="40" height="40" class="svelte-owee86"/></a> <a href="/discord" class="svelte-owee86"><img src="/discord-light.svg" alt="Discord" width="40" height="40" class="svelte-owee86"/></a> <a href="https://bsky.app/profile/nathanhoad.net" class="svelte-owee86"><img src="/bluesky-light.svg" alt="Bluesky" width="40" height="40" class="svelte-owee86"/></a> <a href="https://github.com/nathanhoad" class="svelte-owee86"><img src="/github-light.svg" alt="GitHub" width="40" height="40" class="svelte-owee86"/></a></aside></header><!----> <article class="svelte-1mtlnk6"><header><h1>Godot Editor addon considerations</h1> <aside>April 2023</aside></header> <p>I know a thing or two about making an editor addon for the <a href="https://godotengine.org/">Godot Engine</a>.</p> <p>Over the course of building <a href="https://github.com/nathanhoad/godot_dialogue_manager">Dialogue Manager</a> (and then <i>rebuilding</i> it for Godot 4) and <a href="https://github.com/nathanhoad/godot_puzzle_dependencies">Puzzle Dependencies</a> (and <i>rebuilding</i> it for Godot 4) I learnt a lot about what makes for a friendly guest within
38		the editor.</p> <p>This list is mostly for me as a reminder of the things I've come across but it might be useful
39		to other addon developers so here it is.</p> <h2>Theming</h2> <p>Don't hardcode colours. You don't know what the user's editor looks like so what looks fine to
40		you might be a mess for someone else. Instead, draw colours from the editor theme or the editor
41		settings.</p> <p>For example, <a href="https://github.com/nathanhoad/godot_dialogue_manager">Dialogue Manager</a> draws
42		it's syntax highlighting colours from Godot's script editor colour settings.</p> <p>When making the tab icon, remember to set up the auto-scaling and colouring.</p> <p>Using the right colours inside the SVG isn't enough to trigger the auto-colour switching,
43		however.</p> <figure><img src="/_app/immutable/assets/icon-colour.IMWPkRyy.png" alt="" width="358" height="101"/> <figcaption>Enabled auto-sizing and auto-colouring and then make sure your colours are set up correctly.</figcaption></figure> <p>If you set the <code>fill</code> of the object to <code>#E0E0E0</code> then it will automatically
44		change that to a dark colour when using a light theme.</p> <h2>Scale</h2> <p>Don't assume the editor is scaled is 1.0. Higher density screens 
44will most likely have an editor
45		scale of 1.5 or 2.0 so sizes and positions of things should be multiplied by it to get the
46		correct values.</p> <p>For example, <a href="https://github.com/nathanhoad/godot_puzzle_dependencies">Puzzle Dependencies</a> takes the editor scale into account when laying out it's node graph.</p> <h2>Undo/redo</h2> <p>For most things this might just work without you having to do anything. For more complicated
47		things, you should ensure that the user can undo their accidents when using your addon.</p> <p>For example, <a href="https://github.com/nathanhoad/godot_puzzle_dependencies">Puzzle Dependencies</a> hooks into Godot's UndoRedoManager to make graph actions undoable.</p> <h2>Storing configuration</h2> <p>Where are your files stored? If it's something that should live in source control then think
48		about adding it to the project settings. If not, then a simple JSON file can be stored outside
49		of the project in the <code>user://</code> directory.</p> <h2>Frictionless updating</h2> <p>Make sure your addon follows <a href="https://semver.org/">semantic versioning</a>. If a new
50		version is going to break everything then bump the major version. The minor version is for
51		incremental changes and the patch version is for bugfixes.</p> <p>You might also want to think about notifying your users when a new version has been published.</p> <p>It's also possible to download and <a href="https://youtu.be/oepTYOMoMmc">install new versions of your addon without leaving the editor</a>.</p><!----><!----></article><!----> <footer class="svelte-1wlmi2p"><p class="svelte-1wlmi2p">If you want to keep up to date with my adventures in game development then you should <a href="https://youtube.com/@nathan_hoad" class="svelte-1wlmi2p">subscribe to my YouTube channel</a> or <a href="/discord" class="svelte-1wlmi2p">join my Discord</a>.</p> <p class="svelte-1wlmi2p"><a href="https://patreon.com/nathanhoad" class="svelte-1wlmi2p">Subscribe to my Patreon</a>.</p> <ul class="svelte-1wlmi2p"><li class="svelte-1wlmi2p"><a href="https://youtube.com/@nathan_hoad" class="svelte-1wlmi2p">YouTube</a></li> <li class="svelte-1wlmi2p"><a href="/discord" class="svelte-1wlmi2p">Discord</a></li> <li class="svelte-1wlmi2p"><a href="https://bsky.app/profile/nathanhoad.net" class="svelte-1wlmi2p">Bluesky</a></li> <li class="svelte-1wlmi2p"><a href="https://github.com/nathanhoad" class="svelte-1wlmi2p">GitHub</a></li> <li class="svelte-1wlmi2p"><a href="/rss.xml" class="svelte-1wlmi2p">RSS</a></li></ul> <aside class="svelte-1wlmi2p">© Nathan Hoad</aside></footer><!----><!--]--><!----><!--]--><!--]--> <!--[-1--><!--]--><!--]-->
52			
53			
53<script>
54				{
55					__sveltekit_w0fepj = {
56						base: new URL(".", location).pathname.slice(0, -1)
57					};
58
59					const element = document.currentScript.parentElement;
60
61					Promise.all([
62						import("./_app/immutable/entry/start.BYUHqmMK.js"),
63						import("./_app/immutable/entry/app.CcNnKQ-e.js")
64					]).then(([kit, app]) => {
65						kit.start(app, element, {
66							node_ids: [0, 4],
67							data: [null,null],
68							form: null,
69							error: null
70						});
71					});
72				}
73			</script>
73
74		</div>
75	</body>
76</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.