MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / FromFile

Method FromFile

Source/Engine/Content/Assets/Texture.cpp:179–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179Texture* Texture::FromFile(const StringView& path, bool generateMips)
180{
181 auto texture = Content::CreateVirtualAsset<Texture>();
182 if (texture->LoadFile(path, generateMips))
183 {
184 texture->DeleteObject();
185 texture = nullptr;
186 }
187 return texture;
188}

Callers

nothing calls this directly

Calls 2

DeleteObjectMethod · 0.80
LoadFileMethod · 0.45

Tested by

no test coverage detected