Search Unity

Bug Prefab and parsing problem on my unity project

Discussion in 'Prefabs' started by Yacine_Tz, Nov 13, 2022.

  1. Yacine_Tz

    Yacine_Tz

    Joined:
    Sep 21, 2022
    Posts:
    1
    Hello everyone,

    I'm currently working on a Unity project using git as VCS. So I pulled the project of my collaborators and use git switch to move to the branch where a big part of the project was developed. However, when I launch the project with the unity hub and try to enter play mode, I have the following issue :

    Unable to parse file Assets/Readme.asset: [Parser Failure at line 29: Expect ':' between key and value within mapping]
    Tree prefab at index 0 is missing.
    Problem detected while opening the Scene file: 'Assets/GrassFlowers/Demo/DemoGrassFlowers.unity'.
    Check the following logs for more details.
    Prefab instance problem: PF Conifer Small BOTD (Missing Prefab with guid: 7e3c80b421a0d465b80b8e51a763ea9c)
    [Worker0] Tree prefab at index 0 is missing.
    [Worker1] Unable to parse file Assets/Readme.asset: [Parser Failure at line 29: Expect ':' between key and value within mapping]
    Unable to parse file Assets/Readme.asset: [Parser Failure at line 29: Expect ':' between key and value within mapping]

    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    ReadmeEditor:SelectReadme () (at Assets/TutorialInfo/Scripts/Editor/ReadmeEditor.cs:51)
    ReadmeEditor:SelectReadmeAutomatically () (at Assets/TutorialInfo/Scripts/Editor/ReadmeEditor.cs:26)
    UnityEditor.EditorApplication:Internal_CallDelayFunctions ()
    AmbiguousMatchException: Ambiguous match found.
    System.RuntimeType.GetMethodImplCommon (System.String name, System.Int32 genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at <9aad1b3a47484d63ba2b3985692d80e9>:0)
    System.RuntimeType.GetMethodImpl (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at <9aad1b3a47484d63ba2b3985692d80e9>:0)
    System.Type.GetMethod (System.String name, System.Reflection.BindingFlags bindingAttr) (at <9aad1b3a47484d63ba2b3985692d80e9>:0)
    ReadmeEditor.LoadLayout () (at Assets/TutorialInfo/Scripts/Editor/ReadmeEditor.cs:41)
    ReadmeEditor.SelectReadmeAutomatically () (at Assets/TutorialInfo/Scripts/Editor/ReadmeEditor.cs:31)
    UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <4e64905d831f4883a53259ef37fb023b>:0)
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,982
    Open Readme.asset in a text editor and check if there are any merge markers in there. If so, someone did not correctly merge changes.

    If that's not the issue then compare that file with the one in the git repository. If they differ, delete your local project and pull it again. Make sure you have Unity editor closed while pulling and when switching branches.

    If the file is the same on git, then ask someone else to pull a fresh copy. If the same error occurs, then the project in source control (at least in that branch) is corrupt and you need to dig through the git history to figure out what caused the issue, and try to revert it.
     
    MirceaI likes this.