这是indexloc提供的服务,不要输入任何密码
Skip to content

supabase-community/godot-engine.supabase

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👉 3.x

Godot Engine - Supabase (4.x)

A lightweight addon which integrates Supabase APIs for Godot Engine out of the box.

  • Authentication (/auth)
  • Database (/database)
  • Realtime (/realtime)
  • Storage (/storage)

UI Library

A drag&drop UI Library is available at supabase-ui.

examples and demos

A collection of examples and live demos is available at fenix-hub/godot-engine.supabase-examples, both with source code and exported binaries.

how to use

A wiki is available here.
Even though it is still not complete, Classes and APIs references are always listed and updated.

code snippet

Multiple approaches!

Asynchronous (signals)

# method 1 (connecting to `Supabase.auth.signed_in` signal)
func _ready():
	Supabase.auth.signed_in.connect(_on_signed_in)
	Supabase.auth.sign_in(
		"user@supabase.email",
		"userpwd"
	)

func _on_signed_in(user: SupabaseUser) -> void:
	print(user)

# method 2 (using lambdas, connecting to the `AuthTask.completed` signal)
func _ready():
	Supabase.auth.sign_in(
		"user@supabase.email",
		"userpwd"
	).completed.connect(
		func(authTask: AuthTask) -> void:
			print(auth_task.user)
	)

Synchronous (await)

func _ready():
	var auth_task: AuthTask = await Supabase.auth.sign_in(
		"user@supabase.email",
		"userpwd"
	).completed
	print(auth_task.user)

About

A lightweight addon which integrates Supabase APIs for Godot Engine out of the box.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 6