void Update()
        {
            // I am not super happy with doing this in the update function, but found no other way to make starting in dungeon correctly injecting material properties
            if ((texReflectionGround) && (texReflectionLowerLevel)) // do not change playerInside state before the reflection textures are initialized
            {
                // mechanism implemented according to Interkarma's suggestions
                // transition: inside -> dungeon/palace/building
                if (GameManager.Instance.PlayerEnterExit.IsPlayerInside && !playerInside)
                {
                    playerInside = true; // player now inside

                    // do other stuff when player first inside
                    if (GameManager.Instance.IsPlayerInsideBuilding)
                    {
                        gameObjectInterior = GameObject.Find("Interior");
                        whereInside        = InsideSpecification.Building;
                    }
                    else if ((GameManager.Instance.IsPlayerInsideDungeon) || (GameManager.Instance.IsPlayerInsidePalace))
                    {
                        gameObjectDungeon = GameObject.Find("Dungeon");
                        whereInside       = InsideSpecification.DungeonOrPalace;
                    }

                    InjectMaterialPropertiesIndoor();
                }
                // transition: dungeon/palace/building -> outside
                else if (!GameManager.Instance.PlayerEnterExit.IsPlayerInside && playerInside)
                {
                    playerInside = false; // player no longer inside

                    // do other stuff when player first not inside
                    gameObjectInterior = null;
                    gameObjectDungeon  = null;
                    InjectMaterialPropertiesOutdoor();
                    whereInside = InsideSpecification.Unknown;
                }

                // transition: dungeon/palace -> building
                if ((GameManager.Instance.IsPlayerInsideBuilding) && (whereInside == InsideSpecification.DungeonOrPalace))
                {
                    gameObjectInterior = GameObject.Find("Interior");
                    gameObjectDungeon  = null;
                    InjectMaterialPropertiesIndoor();
                    //injectIndoor = true;
                    whereInside = InsideSpecification.Building;
                }
                // transition: building -> dungeon/palace
                else if (((GameManager.Instance.IsPlayerInsideDungeon) || (GameManager.Instance.IsPlayerInsidePalace)) && (whereInside == InsideSpecification.Building))
                {
                    gameObjectDungeon  = GameObject.Find("Dungeon");
                    gameObjectInterior = null;
                    InjectMaterialPropertiesIndoor();
                    whereInside = InsideSpecification.DungeonOrPalace;
                }
            }
            else
            {
                texReflectionGround     = gameObjectReflectionPlaneGroundLevel.GetComponent <MirrorReflection>().m_ReflectionTexture;
                texReflectionLowerLevel = gameObjectReflectionPlaneSeaLevel.GetComponent <MirrorReflection>().m_ReflectionTexture;
            }
        }
        void Update()
        {
            // I am not super happy with doing this in the update function, but found no other way to make starting in dungeon correctly injecting material properties
            if ((texReflectionGround) && (texReflectionLowerLevel)) // do not change playerInside state before the reflection textures are initialized
            {
                // mechanism implemented according to Interkarma's suggestions
                // transition: inside -> dungeon/palace/building
                if (GameManager.Instance.PlayerEnterExit.IsPlayerInside && !playerInside)
                {
                    playerInside = true; // player now inside

                    // do other stuff when player first inside
                    if (GameManager.Instance.IsPlayerInsideBuilding)
                    {
                        gameObjectInterior = GameObject.Find("Interior");
                        whereInside = InsideSpecification.Building;
                    }
                    else if ((GameManager.Instance.IsPlayerInsideDungeon) || (GameManager.Instance.IsPlayerInsidePalace))
                    {
                        gameObjectDungeon = GameObject.Find("Dungeon");
                        whereInside = InsideSpecification.DungeonOrPalace;
                    }

                    InjectMaterialPropertiesIndoor();
                }
                // transition: dungeon/palace/building -> outside
                else if (!GameManager.Instance.PlayerEnterExit.IsPlayerInside && playerInside)
                {
                    playerInside = false; // player no longer inside

                    // do other stuff when player first not inside
                    gameObjectInterior = null;
                    gameObjectDungeon = null;
                    InjectMaterialPropertiesOutdoor();
                    whereInside = InsideSpecification.Unknown;
                }

                // transition: dungeon/palace -> building
                if ((GameManager.Instance.IsPlayerInsideBuilding) && (whereInside == InsideSpecification.DungeonOrPalace))
                {
                    gameObjectInterior = GameObject.Find("Interior");
                    gameObjectDungeon = null;
                    InjectMaterialPropertiesIndoor();
                    //injectIndoor = true;
                    whereInside = InsideSpecification.Building;
                }
                // transition: building -> dungeon/palace
                else if (((GameManager.Instance.IsPlayerInsideDungeon) || (GameManager.Instance.IsPlayerInsidePalace)) && (whereInside == InsideSpecification.Building))
                {
                    gameObjectDungeon = GameObject.Find("Dungeon");
                    gameObjectInterior = null;
                    InjectMaterialPropertiesIndoor();
                    whereInside = InsideSpecification.DungeonOrPalace;
                }
            }
            else
            {
                texReflectionGround = gameObjectReflectionPlaneGroundLevel.GetComponent<MirrorReflection>().m_ReflectionTexture;
                texReflectionLowerLevel = gameObjectReflectionPlaneSeaLevel.GetComponent<MirrorReflection>().m_ReflectionTexture;
            }
        }