Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Bug MissingReferenceException: Object of type was destroyed

Discussion in 'Localization Tools' started by BorpaBoatski, Sep 8, 2022.

  1. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    45
    Not sure what I did to cause this error but it's popping up now whenever I enter playmode. By the sounds of it there might be a localization component that is referencing a component that no longer exists with it. Is there a way for me to find it?

     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    You could try putting a breakpoint into the callstack.
    Looks like there is a GameObjectLocalizer trying to change an Image component. Can you file a bug report so we can look into this? We should detect if the object is destroyed earlier on.
     
  3. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    45
    Hey! Thanks for the suggestion on breakpoints. I found the GameObject that's causing the error. Unfortunately, I'm still left confused. It says the Image component has been destroyed but it's still there in the scene (attaching pictures of these) and I do not run any destroy methods on the object.

    The GameObject in question: Culprit.jpg

    The GameObject in scene:
    Scene.JPG
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    It looks fine. Are you sure that's the correct GameObject? Maybe it's a different one?
    What version of the package are you using? Can you try 1.3.2?
     
  5. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    45
    Based on the Scene path from the break point, that should be the right one. There is no duplicate / same hierarchy in the scene. The Localization version we are using is 1.3.2.
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Sounds like a bug. Are you able to file a bug report and include the project so we can debug it?
     
  7. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    45
    Alright I have successfully filed the bug report. It's listed as IN-16578.
     
    karl_jones likes this.
  8. Kogamma

    Kogamma

    Joined:
    Feb 19, 2018
    Posts:
    19
    Could you please give me an URL to the issue, I can't seem to find it on my own.
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
  10. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    45
  11. Kogamma

    Kogamma

    Joined:
    Feb 19, 2018
    Posts:
    19
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Sorry that's the wrong bug. IN-16578 is still with QA and not on the issue tracker yet.
     
  13. BorpaBoatski

    BorpaBoatski

    Joined:
    Aug 3, 2018
    Posts:
    45
    @Kogamma They have responded to the bug report and suggested setting the WaitForCompletion on the GameObjectLocalizer component to true. This has worked for me, so hopefully it works for you too.
     
    karl_jones likes this.