Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

assetReference.LoadAsset<AnimationClip>() fails when loading from an FBX file.

Discussion in 'Addressables' started by JC_Andres, Jan 29, 2019.

  1. JC_Andres

    JC_Andres

    Joined:
    Jan 23, 2019
    Posts:
    2
    Hi, I'm trying to use addressables to load an animation clip that is contained in an FBX file. The LoadAsset call seems to be able to load the FBX as a GameObject without any issues; however, it fails when I attempt to load the AnimationClip contained within the FBX.

    For whatever is worth, the loading works if the AnimationClip is not part of the FBX.

    Is this intended? If not, is there any particular configuration I need to use?
     
  2. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    327
    Try: Addressables.LoadAsset<IList<AnimationClip>>("MyFBXAddress");

    this should give you all the animations in the FBX
     
  3. JC_Andres

    JC_Andres

    Joined:
    Jan 23, 2019
    Posts:
    2
    Hi Bill, sorry it took me a while to get back to this. I tested the solution you proposed but it didn't work.

    On Editor, debugging the code, the result from the
    IAsyncOperation<IList<AnimationClip>>
    is empty even though the operation returns as successful.

    On Editor the Addressable profiler shows that the appropriate animation has been loaded and increases its reference number correctly. It also looks like the timeline is able to link back to the animation (even though I cannot set it manually because the operation doesn't return any results).

    That being said, on Device (more specifically on Android) the timeline is unable to connect to the right animation, and since the operation returns an empty array I cannot hook it directly myself.