News Forums Troubleshooting Errors after update!

Tagged: , ,

This topic contains 5 replies, has 3 voices, and was last updated by  Sigil 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33524

    UzuStark98
    Participant

    So RAIN asked if I wanted to update and i pressed yes then it said to backup my project and i did so… After it updated, everything got broken, the AIs that I put on my characters disappeared and all the Entities disappeared too.
    I then went and restored my backup and everything went back to normal except Unity gives me these errors:

    Assets/RAIN/Editor/ScriptTemplates/DecisionTemplate_CS.cs(8,36): error CS0246: The type or namespace name `RAINDecision’ could not be found. Are you missing a using directive or an assembly reference?

    Assets/RAIN/Editor/ScriptTemplates/DecisionTemplate_BOO.boo(5,28): BCE0018: The name ‘RAINDecision’ does not denote a valid type (‘not found’).

    Assets/RAIN/Editor/ScriptTemplates/DecisionTemplate_JS.js(5,35): BCE0018: The name ‘RAIN.Action.RAINDecision’ does not denote a valid type (‘not found’).

    I tried re-importing and got the same errors. Any ideas whats causing this?

    #33526

    prime
    Keymaster

    We’re looking into it.

    #33530

    UzuStark98
    Participant

    oh okay thnx for answering!

    #33533

    Sigil
    Keymaster

    Ok, so it looks like there are compiling problems that are stopping RAIN from completely loading in your project.

    First lets get rid of the errors you have after restoring your backup. If you go into the RAIN/Editor/ScriptTemplates folder you will find three scripts all starting with DecisionTemplate. Go ahead and remove those as they will only work with the latest version of RAIN. This should get your backup running again.

    At this point if you try the update again and things break, take a look at the console log and see if there are any errors. Either way come back and let us know.

    #33594

    UzuStark98
    Participant

    ohh lol, i should have deleted the old project before restoring the backup XD… anyways, it worked, thnx alot!

    Edit: I will try updating now.

    Edit2: okay so I updated and now the same thing happened, The AI that I had on any of my characters is not working.
    What i mean is, the AI gameobject itself is still there but the AIRig(Script) is the one not working, it doesnt show the RAIN system for it….. well basically, this,

    and I got 1 error instantly after update:

    ArgumentException: Object type UnityEngine.Transform cannot be converted to target type: RAIN.BehaviorTrees.BTAsset
    Parameter name: val
    System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoField.cs:133)
    System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/FieldInfo.cs:150)
    RAIN.Serialization.FieldSerializer.DeserializeClassFromElement (RAIN.Serialization.ObjectElement aParent, System.Object aObject)
    RAIN.Serialization.FieldSerializer.DeserializeReferenceFromElement (Int32 aRefIndex, System.Type aType, System.Object aValue, System.Object& aResult)
    RAIN.Serialization.FieldSerializer.DeserializeObjectFromElement (RAIN.Serialization.ObjectElement aElement, System.Type aType, System.Object aValue, System.Object& aResult)
    RAIN.Serialization.FieldSerializer.DeserializeFieldFromElement (RAIN.Serialization.ObjectElement aParent, System.String aFieldName, System.String[] aOldFieldNames, System.Type aFieldType, System.Object aFieldValue, System.Object& aFieldResult)
    RAIN.Serialization.FieldSerializer.DeserializeClassFromElement (RAIN.Serialization.ObjectElement aParent, System.Object aObject)
    RAIN.Serialization.FieldSerializer.DeserializeReferenceFromElement (Int32 aRefIndex, System.Type aType, System.Object aValue, System.Object& aResult)
    RAIN.Serialization.FieldSerializer.DeserializeObjectFromElement (RAIN.Serialization.ObjectElement aElement, System.Type aType, System.Object aValue, System.Object& aResult)
    RAIN.Serialization.FieldSerializer.DeserializeFieldFromElement (RAIN.Serialization.ObjectElement aParent, System.String aFieldName, System.String[] aOldFieldNames, System.Type aFieldType, System.Object aFieldValue, System.Object& aFieldResult)
    RAIN.Serialization.FieldSerializer.DeserializeClassFromElement (RAIN.Serialization.ObjectElement aParent, System.Object aObject)
    RAIN.Serialization.FieldSerializer.DeserializeRAINObject (System.Object aComponent)
    RAIN.Core.RAINComponent.OnValidate ()
    RAIN.Core.AIRig.OnValidate ()

    and then when i clicked on the AI gameobject that has the AIRig I got:

    1- The same error I got above.

    2- NullReferenceException: Object reference not set to an instance of an object
    RAINEditor.Core.RAINComponentEditor.OnInspectorGUI ()
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/Inspector/InspectorWindow.cs:1124)
    UnityEditor.DockArea:OnGUI()

    ^^ I got that one (2) 4 times.

    • This reply was modified 2 months ago by  UzuStark98.
    • This reply was modified 2 months ago by  UzuStark98.
    • This reply was modified 2 months ago by  Sigil. Reason: Inline image
    #33602

    Sigil
    Keymaster

    Ok, is the AI in question on a prefab (or prefab instance)? We’ve had this problem before with prefabs where our serialization gets out of sync with Unity’s, and the errors look similar to that. It is fixed in the latest version but unfortunately only for updates from this point on.

    If it is a prefab, to fix it you can revert the prefab instance and it should stop the errors. If reverting isn’t an option, before updating you can break the prefab instance on any of the objects that are suffering, and then update, that should keep it from getting garbled.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.