modelLoader

Functions for evaluation UnityBase model JS files

Methods

loadEntitiesModules(folderPath, depthopt) inner

Load all .js for which pair .meta is exists
Arguments:
  1. folderPath (String)
  2. [depth=0] (number)  Recursion depth

loadLegacyModules(folderPath, isFromPublicFolder, depth) inner

For UB < 4.2 compatibility - require all non - entity js in specified folder add it's subfolder (one level depth), exclude modules and node_modules subfolder's. From 'public' subfolder only cs*.js are required. To be called in model index.js as such: const modelLoader = require('@unitybase/ub).modelLoader

For new models we recommend to require non-entity modules manually

Arguments:
  1. folderPath (String)
  2. isFromPublicFolder=false (Boolean)
  3. depth=0 (number)  Current recursion depth