Grid/TileMap rotation not affecting child GameObjects?
I'm attempting to rotate a TileMap and its associated children GameObjects. My current setup is a RuleTile that has an associated GameObject for each rule, so it is spawned. However, I'd like the objects (and the tilemap) to exist within the XZ plane, rather than XY. For some reason when I change the rotation of the tilemap in the Inspector prior to playing the scene, the GameObjects still spawn in the XY plane. The same thing occurs when I try to change the rotation using script in the scene's "Start()" function. I only get the desired result when I manually rotate the Grid/Tilemap in the inspector whil the scene is running, and then I need to go through and rotate the GameObjects to get them oriented correctly. Here is the code I am using that isn't working:
tilemap.transform.position = new Vector3(0.0f, 0.5f, 0.0f); tilemap.transform.Rotate(new Vector3(90.0f, 0.0f, 0.0f));
Is this intended behavior? Is there some way to fix this?
Thank you.