Unity Ignores me when i set a field null

This is one of these “Am i going crazy” Situations.
I have a button which calls a script… it sets something null (which is nullable). One Line later its not null.
I placed breakpoints to confirm that my code is called. But once the code returns from ResetDungeonLayout its not null anymore.

        [Button]
        [HideInPlayMode]
        public void ReloadCurrentDungeonLayout()
        {
         ....

 mapCreating_DungeonLayout.ResetDungeonLayout();

        .....
        }

// In the DungeonLayout
        public override void ResetDungeonLayout()
        {
            _map = null;
            _mapDataContainer = null;
        }

It sets to null fine.
7910638--1008694--upload_2022-2-19_22-42-23.png
But immediately after its not null at all. 7910638--1008697--upload_2022-2-19_22-49-4.png

There are so many things that could’ve gone wrong. What is the type of _map? Where else are you assigning to it? Is it serialized?

Do a global search for all references to _map in your code.
Add a Debug.Log to each Method that sets _map to anything (or a break Point).
It’s being set somewhere - maybe check the contents of _map to see what is being set there - this should help you find out where it is being set, Finally, and you might already know this but variables serialized in the editor supersede variables set in a script to start.

ResetDungeonLayout() is also not returning Map - so check where you return this correctly.

Today i did go over it again. All the places where _map is set are break pointed. But _map is already not null anymore when it returns from ResetDungeonLayout().
I am thinking maybe this has something to do with the editor and serialization. Its like the editor reloads the object from the asset between 2 lines of code. Or something is setting the property with reflection…