Unravel Engine C++ Reference
Loading...
Searching...
No Matches
asset_actions.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <string>
7
9{
10
11auto resolve_asset_source_path(const std::string& asset_key) -> fs::path;
12auto resolve_asset_source_path(const fs::path& path) -> fs::path;
13
14auto can_reimport(const fs::path& absolute_path) -> bool;
15
16void reimport_path(const fs::path& absolute_path);
17void reimport_key(const std::string& asset_key);
18
19template<typename T>
20void reimport(const asset_handle<T>& asset)
21{
22 reimport_key(asset.id());
23}
24
25auto is_valid_csharp_identifier(const std::string& name) -> bool;
26
31auto create_script_from_template(const fs::path& template_path,
32 const fs::path& dst,
33 std::string* error = nullptr) -> bool;
34
35} // namespace unravel::asset_actions
std::string name
Definition hub.cpp:33
std::string error
Definition mcp_async.cpp:33
auto is_valid_csharp_identifier(const std::string &name) -> bool
auto resolve_asset_source_path(const std::string &asset_key) -> fs::path
void reimport_key(const std::string &asset_key)
auto create_script_from_template(const fs::path &template_path, const fs::path &dst, std::string *error) -> bool
Instantiate a ScriptComponent template (.cs.in), substituting #SCRIPTNAME# with the destination file ...
void reimport(const asset_handle< T > &asset)
void reimport_path(const fs::path &absolute_path)
auto can_reimport(const fs::path &absolute_path) -> bool
Thread-safe handle to an asset.
auto id() const -> std::string
Gets the string identifier of the asset.