-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update missing things. Update sample to use resource.
- Loading branch information
Showing
8 changed files
with
35 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
#include "resource_loader_sqlite.h" | ||
#include "resource_sqlite.h" | ||
|
||
Variant ResourceFormatLoaderSqlite::_load(const String &p_path, const String &original_path, bool use_sub_threads, int32_t cache_mode) const { | ||
Ref<SqliteResource> sqlite_model = memnew(SqliteResource); | ||
Variant ResourceFormatLoaderSQLite::_load(const String &p_path, const String &original_path, bool use_sub_threads, int32_t cache_mode) const { | ||
Ref<SQLiteResource> sqlite_model = memnew(SQLiteResource); | ||
sqlite_model->set_file(p_path); | ||
return sqlite_model; | ||
} | ||
PackedStringArray ResourceFormatLoaderSqlite::_get_recognized_extensions() const { | ||
PackedStringArray ResourceFormatLoaderSQLite::_get_recognized_extensions() const { | ||
PackedStringArray array; | ||
array.push_back("bin"); | ||
array.push_back("db"); | ||
return array; | ||
} | ||
bool ResourceFormatLoaderSqlite::_handles_type(const StringName &type) const { | ||
return ClassDB::is_parent_class(type, "SqliteResource"); | ||
bool ResourceFormatLoaderSQLite::_handles_type(const StringName &type) const { | ||
return ClassDB::is_parent_class(type, "SQLiteResource"); | ||
} | ||
String ResourceFormatLoaderSqlite::_get_resource_type(const String &p_path) const { | ||
String ResourceFormatLoaderSQLite::_get_resource_type(const String &p_path) const { | ||
String el = p_path.get_extension().to_lower(); | ||
if (el == "sqlite") { | ||
return "SqliteResource"; | ||
if (el == "db") { | ||
return "SQLiteResource"; | ||
} | ||
return ""; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters