S&box Wiki

Revision Difference

DefaultSharedAssetFilter#544795

<cat>Code.Misc</cat> <title>Default Shared Asset Filter</title> Assets networked to clients can be configured to some extent using the [addon schema](/sbox/.addon_schema#sharedassetsfilter). However, this filter is currently quite primitive, so it can be useful to know the game's internal logic for excluding files to send. The following files are excluded. - Files and directories in the root directory that begin with a `.`. For instance, `YOUR_ADDON/.foo/bar.txt` would not be sent, but `YOUR_ADDON/foo/.bar/baz.txt` would. - Files without an extension (no `.` in the name). - Source code, project files, and compilation artifacts: `code/*`, `*.cs`, `properties/*`, `obj/*`, `*.pdb`, and `*.csproj`. Addons are networked as compiled assemblies. This does NOT mean you should be putting secrets in your source code, since your addon will be trivial to decompile. - Valve Pak Files: `*.vpk`.- Map source files: `*.vmap` *`*.los`⤶ - Model source files: `*.dmx`, `*.fbx`, `*.vmdl`, and `*.vanmgrph`. - Texture and material source files: `*.tga`, `*.tif`, `*.vmat`, `*_color.png`, and `*_color.txt`. - Texture and material source files: `*.tga`, `*.tif`, `*.psd`, `*.vmat`, `*_color.png`, and `*_color.txt`. - Sound source files: `*.sound` and `*.wav`. - Particle source files: `.vpcf`. - Executables and (windows) shell scripts: `*.exe`, `*.cmd`, `*.dll`, `*.bat`, and `.bin`. - Files ending with `.cache` and `accesslist.txt`. - Files containing `_bakeresourcecache` and `codegen-exception`.