AnimComponentLayer.getAnimationAsset always returns {"asset": null}
on template instances created at runtime
#6860
Labels
{"asset": null}
on template instances created at runtime
#6860
Description
When instantiating an entity with an Anim component from a template at runtime, AnimComponentLayer.getAnimationAsset never returns a valid animation asset - it always returns an object of the form
{"asset": null}
. I have filed a separate issue due to this differing from the documentation (which suggests this should return apc.Asset
instance).Example project:
https://playcanvas.com/project/1240526 (published build)
Steps to Reproduce
templateAsset.resource.instantiate()
, don't place it in the editor)AnimComponentLayer.getAnimationAsset
Expected result: Some kind of usable asset (either a
pc.Asset
or at least an asset id)Observed result: A Javascript object
{asset: null}
Note that for an entity instantiated in the editor (either from the same template or just manually) will return
{asset: [ASSET ID NUMBER]}
instead.The text was updated successfully, but these errors were encountered: