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
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: GLTFast
Assembly: glTFast.dots.dll
Syntax
public class GltfEntityAsset : GltfAssetBase
Properties
FullUrl
Declaration
public string FullUrl { get; }
Property Value
Type | Description |
---|---|
string |
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
Type | Description |
---|---|
bool |
SceneId
Scene to load (-1 loads glTFs default scene)
Declaration
protected int SceneId { get; }
Property Value
Type | Description |
---|---|
int |
StreamingAsset
If true, url is treated as relative StreamingAssets path
Declaration
public bool StreamingAsset { get; }
Property Value
Type | Description |
---|---|
bool |
Url
Declaration
public string Url { get; }
Property Value
Type | Description |
---|---|
string |
Methods
ClearScenes()
Removes previously instantiated scene(s)
Declaration
public override void ClearScenes()
Overrides
GetDefaultInstantiator(ICodeLogger)
Declaration
protected override IInstantiator GetDefaultInstantiator(ICodeLogger logger)
Parameters
Type | Name | Description |
---|---|---|
ICodeLogger | logger |
Returns
Type | Description |
---|---|
IInstantiator |
Overrides
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
Type | Description |
---|---|
Task<bool> |
Overrides
PostInstantiation(IInstantiator, bool)
Declaration
protected override void PostInstantiation(IInstantiator instantiator, bool success)
Parameters
Type | Name | Description |
---|---|---|
IInstantiator | instantiator | |
bool | success |
Overrides
Start()
Declaration
protected virtual void Start()