GodotEnv

An asset by cuca
The page banner background of a mountain and forest
GodotEnv hero image

Quick Information

0 ratings
GodotEnv icon image
cuca
GodotEnv

This addon was made for .env file consuming and creation in Godot Engine

Supported Engine Version
3.2
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
4 years ago
Git URL
Issue URL

GodotEnv

This addon was made for .env file consuming and creation in Godot Engine. 📁

Installation

As this project was recently created and isn't on Godot Asset Store yet, you have to 1) clone manually this repository and copy its contents of addons/ folder to your project's addons/ folder. And then 2) activate the plugin at Project Settings.

Obs.: Probably you want to also be able to read the .env file from the release binary, to do so you must add .env inside the filters to export field at the Resources tab of your export preset. Example below. README image

Usage

After installation, the plugin will add GodotEnv as one of your autoload/singleton scripts. The simple utilities are: The .env file must be at your root project directory. (i.e. res://)

GodotEnv

create(variable_name: String, value: String, overwrite: bool = false) -> void

It will create a new variable_name=value line at your .env file. If you don't have one, this will create the dotenv file and add this as the first line. If variable_name already exists inside your dotenv, it will be ignored and trigger a warning unless you pass overwrite parameter as true.

get_var(variable_name: String) -> String

Returns the value of the requested environment variable. If it doesn't exists, a warning will be pushed and the zero-value "" will be returned.

This addon was made for .env file consuming and creation in Godot Engine

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
GodotEnv icon image
cuca
GodotEnv

This addon was made for .env file consuming and creation in Godot Engine

Supported Engine Version
3.2
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
4 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers