25 lines
578 B
GDScript3
25 lines
578 B
GDScript3
|
@tool
|
||
|
extends Node
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
func _init():
|
||
|
add_custom_project_setting("twitch_god/client_id", "Test", TYPE_STRING)
|
||
|
print("Test")
|
||
|
|
||
|
func add_custom_project_setting(name: String, default_value, type: int, hint: int = PROPERTY_HINT_NONE, hint_string: String = ""):
|
||
|
#if ProjectSettings.has_setting(name): return
|
||
|
|
||
|
var setting_info: Dictionary = {
|
||
|
"name": name,
|
||
|
"type": type,
|
||
|
"hint": hint,
|
||
|
"hint_string": hint_string
|
||
|
}
|
||
|
|
||
|
ProjectSettings.set_setting(name, default_value)
|
||
|
ProjectSettings.add_property_info(setting_info)
|
||
|
ProjectSettings.set_initial_value(name, default_value)
|