Class GltfEntityAsset
Loads a glTF from a MonoBehaviour but instantiates Entities.
Intermediate solution and drop-in replacement for GltfAsset
TODO: To be replaced with a pure ECS concept
Inheritance
GltfEntityAsset
Assembly: glTFast.dots.dll
Syntax
public class GltfEntityAsset : GltfAssetBase
Properties
FullUrl
Declaration
public string FullUrl { get; }
Property Value
InstantiationSettings
Declaration
public InstantiationSettings InstantiationSettings { get; set; }
Property Value
| Type |
Description |
| InstantiationSettings |
|
LoadOnStartup
Automatically load at start
Declaration
public bool LoadOnStartup { get; set; }
Property Value
SceneId
Scene to load (-1 loads glTFs default scene)
Declaration
protected int SceneId { get; }
Property Value
StreamingAsset
If true, url is treated as relative StreamingAssets path
Declaration
public bool StreamingAsset { get; }
Property Value
Url
Declaration
public string Url { get; }
Property Value
Methods
ClearScenes()
Removes previously instantiated scene(s)
Declaration
public override void ClearScenes()
GetDefaultInstantiator(ICodeLogger)
Declaration
protected override IInstantiator GetDefaultInstantiator(ICodeLogger logger)
Parameters
| Type |
Name |
Description |
| ICodeLogger |
logger |
|
Returns
| Type |
Description |
| IInstantiator |
|
Load(string, IDownloadProvider, IDeferAgent, IMaterialGenerator, ICodeLogger)
Declaration
public override Task<bool> Load(string gltfUrl, IDownloadProvider downloadProvider = null, IDeferAgent deferAgent = null, IMaterialGenerator materialGenerator = null, ICodeLogger logger = null)
Parameters
| Type |
Name |
Description |
| string |
gltfUrl |
|
| IDownloadProvider |
downloadProvider |
|
| IDeferAgent |
deferAgent |
|
| IMaterialGenerator |
materialGenerator |
|
| ICodeLogger |
logger |
|
Returns
PostInstantiation(IInstantiator, bool)
Declaration
protected override void PostInstantiation(IInstantiator instantiator, bool success)
Parameters
| Type |
Name |
Description |
| IInstantiator |
instantiator |
|
| bool |
success |
|
Start()
Declaration
protected virtual void Start()