Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Why did Addressable detect prefab changes when I only changed the attached monoscript?

Discussion in 'Editor & General Support' started by jack021457, May 30, 2023.

  1. jack021457

    jack021457

    Joined:
    Mar 18, 2015
    Posts:
    22
    For example: I have a monoscript attached on LevelView prefab. whenever I change this monoscript(add a line) then run the "Check for Content Update Restrictions" it shows LevelView prefab has been changed.

    For other prefabs, it gives the same result.

    Is it a bug? Im using addressables 1.20.5 Unity 2020.3.36

    upload_2023-5-30_17-36-5.png

    Thanks for any reply
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,571
    The only thing I can think of is they hash the source files of the class(es) used in the prefab and noticed that it changed?

    If so this is brand-new behavior (to me) in Unity, since code isn't delivered via Addressable / Asset Bundle.

    What kind of diffs do you see from source control?
     
  3. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,647
    Kurt-Dekker likes this.
  4. jack021457

    jack021457

    Joined:
    Mar 18, 2015
    Posts:
    22
    The most weird thing is: there is no diff from source control.

    And I had read the source code of addressable, I found out that addressable would add warning flag if any dependency of this asset had changed.

    In my case, the monoscript is the prefab's dependency. So when i change the monoscript, the prefab is flagged.

    I dont know why does addressable design like this? And there is no optional case for user to choose.