Interface IFileLoader ​
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
Interface for loading compiled game resources.
public interface IFileLoaderRemarks ​
This interface is intended for loading compiled resources (such as models, textures, materials) that need to be parsed as objects. Implementations handle resource lookup across VPK packages and loose files.
Methods ​
LoadFile(string) ​
Loads a compiled resource file.
Resource? LoadFile(string file)Parameters ​
file string
Path to the resource file to load.
Returns ​
Loaded resource, or null if not found.
Remarks ​
To read raw file bytes from a VPK package, use Package.ReadEntry instead.
LoadFileCompiled(string) ​
Same as but appends "_c" to the end of the string.
Resource? LoadFileCompiled(string file)Parameters ​
file string
Path to the file to load (without _c suffix).
Returns ​
Loaded compiled resource, or null if not found.
LoadShader(string) ​
Loads a shader collection by name.
ShaderCollection? LoadShader(string shaderName)Parameters ​
shaderName string
Name of the shader to load.
Returns ​
Loaded shader collection, or null if not found.

