Forum rules - please read before posting.

Cannot Play Animations

My game is basically a series of pictures (jpg's) with hotspots - something like Myst or Riven where the player is not shown. Similarly, NPC are part of the still picture and I use hotspots to interact with them. In other words, no animation of any character is required. I still created the various characters with the Character Wizard for names and profile pictures in the dialog. However, when creating a character a prefab is required, so I just loaded a blank prefab.

This appeared to work well enough - the game runs and dialog works as intended, but I recently realized that the game is generating a the following warnings every time a dialog is triggered:

Animator is not playing an AnimatorController
UnityEngine.StackTraceUtility:ExtractStackTrace ()
AC.AnimEngine_SpritesUnity:PlayCharAnim (string,int) (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:992)
AC.AnimEngine_SpritesUnity:PlayStandardAnim (string,bool) (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:963)
AC.AnimEngine_SpritesUnity:PlayIdle () (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:817)
AC.Char:_Awake () (at Assets/AdventureCreator/Scripts/Character/Char.cs:597)
AC.NPC:Awake () (at Assets/AdventureCreator/Scripts/Character/NPC.cs:60)

Cannot play animation idle_U (layer 0) on character C3 Susan's Animator, Blank Prefab

-> AC debug logger
UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
AC.ACDebug:LogWarning (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:33)
AC.AnimEngine_SpritesUnity:PlayCharAnim (string,int) (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:1015)
AC.AnimEngine_SpritesUnity:PlayStandardAnim (string,bool) (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:963)
AC.AnimEngine_SpritesUnity:PlayIdle () (at Assets/AdventureCreator/Scripts/Animation/AnimEngine_SpritesUnity.cs:817)
AC.Char:_Awake () (at Assets/AdventureCreator/Scripts/Character/Char.cs:597)
AC.NPC:Awake () (at Assets/AdventureCreator/Scripts/Character/NPC.cs:60)

This rapidly fills up the Editor log under Users/Local/Unity, to the point where the hard drive gets full and crashes. I did select the Don't Animate Speaker option in the Dialog action, but it does not appear to make a difference. Any advice on how to create characters, or how to set up the blank prefab to prevent these errors?

Thanks

Comments

  • Look for the "Standard 2D animations" panel in your NPC Inspectors. By default, you'll have entries for the Idle name, Walk name etc fields.

    These are the names of the animation states AC will attempt to play. Clearing them, if you have no need for them, will stop AC spamming the Console with these warnings.

  • Thanks, that cleared those errors up. Another that pops up is related to the Navmesh and the Sorting Map (I presume these are related?):

    Could not initialise NavMesh - was one set as the Default in the Scene Manager?

    -> AC debug logger
    UnityEngine.Debug:LogWarning (object,UnityEngine.Object)
    AC.ACDebug:LogWarning (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:33)
    AC.NavigationEngine_PolygonCollider:OnReset (AC.NavigationMesh) (at Assets/AdventureCreator/Scripts/Navigation/NavigationEngine_PolygonCollider.cs:90)
    AC.NavigationManager:ResetEngine () (at Assets/AdventureCreator/Scripts/Managers/NavigationManager.cs:97)
    AC.NavigationManager:OnAwake (AC.NavigationMesh) (at Assets/AdventureCreator/Scripts/Managers/NavigationManager.cs:39)
    AC.SceneSettings:OnInitGameEngine () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:103)
    AC.KickStarter:Initialise () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1123)
    AC.MultiSceneChecker:Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:45)

    Blank Prefab cannot find Sorting Map to follow!

    -> AC debug logger
    UnityEngine.Debug:Log (object,UnityEngine.Object)
    AC.ACDebug:Log (object,UnityEngine.Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:20)
    AC.FollowSortingMap:Start () (at Assets/AdventureCreator/Scripts/Navigation/FollowSortingMap.cs:130)

  • They are to do with the state of your scene.

    In a typical 2D scene, both a NavMesh and a Sorting Map need to be set up. The NavMesh describes the area of the scene that characters can move around, and the Sorting Map describes how character sprites react as they do so - e.g. shrinking as they move vertically up so as to appear to have depth.

    If your character's don't move around, your game may not strictly require them and the warnings can be ignored. If you do need them, a series of tutorials that cover creation of 2D scenes - including NavMeshes and Sorting Maps - can be found here.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.