Search Unity

Is it possible to create a mecanim state machine via an editor script?

Discussion in 'Animation' started by squared55, Feb 10, 2015.

  1. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    If it's possible, where can I go about learning how?
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
  3. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Thanks for the reply!

    How can I access this? I did a quick google search, but it didn't return anything relevant at first glance. Reason I ask is that I intend on including it with an asset store AI package.

    Unfortunately, I can't afford an upgrade at the moment. Looks awesome though!
     
  4. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Are you sure it a good idea?
    I mean 4.x is at the end of his life cycle, so if you push a package for 4.x based on an internal API that will change in 5.0 your package won't be compatible with 5.0. You will need to upgrade your whole package to 5.0 API.

    Anyway like I said there is no doc in 4.x for this because it was all internal and not ready to be used by end-user.
    With auto completion maybe you can discover all the function available on those class.
    UnityEditorInternal.Transition
    UnityEditorInternal.StateMachine
    UnityEditorInternal.State
    UnityEditorInternal.BlendTree
    UnityEditorInternal.AnimatorControllerLayer
    UnityEditorInternal.AnimatorControllerParameter
     
  5. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Well, I guess I'm stuck between a rock and a hard place here. Either I work on it now and have it work with 4.x, or I violate the EULA as I'm working on the project with Pro at the moment and can't afford an upgrade.

    Thanks!
     
  6. Gizmoi

    Gizmoi

    Joined:
    Jan 9, 2013
    Posts:
    327
    The changes in 5.0 are minimal, I did a similar Animator generator and it took a couple of minutes to update to the public version in Unity 5 Beta.
     
  7. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    We do have a script updater, and we did few pass for all the mecanim stuff, like Gizmoi said maybe the difference is not big enough and the script updater do a really good job.

    It was not my goal to discourage you to do it but rather give you all the information so that you are aware that you will have some work to do to upgrade your package to 5.0

    Good luck
     
  8. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    402
    I couldn't figure out how to add a blend tree to an animator.

    Is Unity5 available for beta... or not yet/only paid?