ScriptResource.cpp 561 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Resource/ScriptResource.h>
  6. #include <AnKi/Util/File.h>
  7. namespace anki {
  8. Error ScriptResource::load(const ResourceFilename& filename, [[maybe_unused]] Bool async)
  9. {
  10. ResourceFilePtr file;
  11. ANKI_CHECK(openFile(filename, file));
  12. ResourceString src;
  13. ANKI_CHECK(file->readAllText(src));
  14. m_source = std::move(src);
  15. return Error::kNone;
  16. }
  17. } // end namespace anki