3#include <engine/engine_export.h>
20struct physics_material;
35 static_assert(!std::is_same_v<T, T>,
"get_suported_formats must be specialized for this type");
36 static const std::vector<std::string> result = {};
47 static std::vector<std::string> formats = {
".ttf",
".otf"};
54 static std::vector<std::string> formats = {
".etex",
".png",
".jpg",
".jpeg",
".tga",
".dds",
".ktx",
".ktx2",
".pvr",
".exr",
".hdr",
".bmp",
".gif",
".psd"};
61 static std::vector<std::string> formats = {
".emesh",
".gltf",
".glb",
".obj",
".fbx",
".FBX",
".dae",
".blend",
".3ds"};
68 static std::vector<std::string> formats = {
".eaudioclip",
".ogg",
".wav",
".flac",
".mp3"};
75 static std::vector<std::string> formats = {
".sh"};
82 static std::vector<std::string> formats = {
".rcss"};
89 static std::vector<std::string> formats = {
".sc"};
96 static std::vector<std::string> formats = {
".mat",
".ematerial"};
103 static std::vector<std::string> formats = {
".anim"};
110 static std::vector<std::string> formats = {
".pfb"};
117 static std::vector<std::string> formats = {
".spfb"};
124 static std::vector<std::string> formats = {
".phm",
".ephmaterial"};
131 static std::vector<std::string> formats = {
".cs"};
138 static std::vector<std::string> formats = {
".rhtml"};
145 static std::vector<std::string> formats = {
".rcss"};
177 return std::find_if(std::begin(supported),
179 [&](
const std::string& el)
181 return el.find(
ex) != std::string::npos;
182 }) != std::end(supported);
268inline auto get_format(
bool include_dot =
true) -> std::string
282 for(
auto& fmt : formats)
284 fmt.insert(fmt.begin(),
'*');
292 static const std::string result =
".meta";
299 return prefix +
"data";
304 return prefix +
"data";
309 return prefix +
"compiled";
328inline auto get_type(
const std::string&
ex,
bool is_directory =
false) ->
const std::string&
332 static const std::string result =
"Texture";
337 static const std::string result =
"Shader";
342 static const std::string result =
"Material";
347 static const std::string result =
"Mesh";
352 static const std::string result =
"Animation Clip";
357 static const std::string result =
"Audio Clip";
362 static const std::string result =
"Prefab";
367 static const std::string result =
"Scene";
372 static const std::string result =
"Physics Material";
377 static const std::string result =
"Script";
382 static const std::string result =
"Font";
387 static const std::string result =
"UI Tree";
392 static const std::string result =
"Style Sheet";
397 static const std::string result =
"Folder";
401 static const std::string result;
418 return ex ==
".emesh" ||
ex ==
".glb" ||
ex ==
".fbx" ||
ex ==
".FBX" ||
419 ex ==
".blend" ||
ex ==
".3ds" ||
ex ==
".dae";
484 if constexpr(std::is_same_v<T, gfx::texture>)
486 static const std::string result =
"Texture";
489 if constexpr(std::is_same_v<T, gfx::shader>)
491 static const std::string result =
"Shader";
494 if constexpr(std::is_same_v<T, unravel::material>)
496 static const std::string result =
"Material";
499 if constexpr(std::is_same_v<T, unravel::mesh>)
501 static const std::string result =
"Mesh";
504 if constexpr(std::is_same_v<T, unravel::animation_clip>)
506 static const std::string result =
"Animation Clip";
509 if constexpr(std::is_same_v<T, unravel::audio_clip>)
511 static const std::string result =
"Audio Clip";
514 if constexpr(std::is_same_v<T, unravel::prefab>)
516 static const std::string result =
"Prefab";
519 if constexpr(std::is_same_v<T, unravel::scene_prefab>)
521 static const std::string result =
"Scene";
524 if constexpr(std::is_same_v<T, unravel::physics_material>)
526 static const std::string result =
"Physics Material";
529 if constexpr(std::is_same_v<T, unravel::script>)
531 static const std::string result =
"Script";
534 if constexpr(std::is_same_v<T, unravel::script_library>)
536 static const std::string result =
"Scripts";
539 if constexpr(std::is_same_v<T, unravel::font>)
541 static const std::string result =
"Font";
544 if constexpr(std::is_same_v<T, unravel::ui_tree>)
546 static const std::string result =
"UI Tree";
549 if constexpr(std::is_same_v<T, unravel::style_sheet>)
551 static const std::string result =
"Style Sheet";
555 static const std::string result;
gfx::texture_format format
auto get_suported_formats< gfx::shader >() -> const std::vector< std::string > &
auto get_all_formats() -> const std::vector< std::vector< std::string > > &
auto get_format(bool include_dot=true) -> std::string
auto get_compiled_directory_no_slash(const std::string &prefix={}) -> std::string
auto get_suported_formats< unravel::ui_tree >() -> const std::vector< std::string > &
auto get_data_directory(const std::string &prefix={}) -> std::string
auto get_format_version< unravel::material >() -> uint64_t
auto get_suported_formats< unravel::audio_clip >() -> const std::vector< std::string > &
auto get_type() -> const std::string &
auto is_format(const std::string &ex) -> bool
auto get_format_version< unravel::animation_clip >() -> uint64_t
auto get_meta_directory_no_slash(const std::string &prefix={}) -> std::string
auto get_suported_formats< unravel::scene_prefab >() -> const std::vector< std::string > &
auto get_suported_formats< unravel::style_sheet >() -> const std::vector< std::string > &
auto get_suported_formats< unravel::animation_clip >() -> const std::vector< std::string > &
auto get_suported_formats< unravel::font >() -> const std::vector< std::string > &
auto get_meta_format() -> const std::string &
auto get_compiled_directory(const std::string &prefix={}) -> std::string
auto get_suported_formats< unravel::physics_material >() -> const std::vector< std::string > &
auto get_suported_formats< gfx::texture >() -> const std::vector< std::string > &
auto get_suported_dependencies_formats< gfx::shader >() -> const std::vector< std::string > &
auto get_meta_directory(const std::string &prefix={}) -> std::string
auto get_suported_formats< unravel::prefab >() -> const std::vector< std::string > &
auto is_binary(const std::string &ex) -> bool
auto get_format_version< unravel::audio_clip >() -> uint64_t
auto get_format_version< gfx::texture >() -> uint64_t
auto get_suported_formats< unravel::material >() -> const std::vector< std::string > &
auto get_suported_formats< unravel::mesh >() -> const std::vector< std::string > &
auto get_format_version() -> uint64_t
auto get_suported_formats() -> const std::vector< std::string > &
auto get_suported_dependencies_formats< unravel::ui_tree >() -> const std::vector< std::string > &
auto get_format_version< unravel::physics_material >() -> uint64_t
auto get_data_directory_no_slash(const std::string &prefix={}) -> std::string
auto get_suported_dependencies_formats() -> const std::vector< std::string > &
auto get_suported_formats_with_wildcard() -> std::vector< std::string >
auto get_suported_formats< unravel::script >() -> const std::vector< std::string > &
auto get_format_version< unravel::mesh >() -> uint64_t