Drawing image into specific layer? [solved]

Hi, I am trying to draw a image into the screen, with PIXI.
Currently using:

Code:
var img = PIXI.Sprite.fromImage('./img/pictures/logo.png');
SceneManager._scene.addChild(img);

That works, but the image is on the top layer, and I need to draw the image on the 'floor' layer, between tileset <-> events.
Maybe some container for each layer exists?

Thanks
Yes, there is.

Spriteset_Map has a _baseSprite property that holds the tilemap, and the tilemap holds both the tiles and the characters.

Something like this might get you somewhere:

SceneManager._scene._spriteset._tilemap.addChildAt(img, x)

where x is 1, 2, 3, etc - just experiment until you get the right place.
Thanks @Shaz for pointing me into the right direction, that seems to work but there are some strange Z position issues, sometimes the images change their z position while the character is moving, so instead of directly addiing images i used two containers with diferent z positions.

Code:
            // BOTTOM LAYER
            BlackLights.layer.bottom = new PIXI.Container();
            var map_width = ($gameMap.width() * $gameMap.tileWidth());
            var map_height = ($gameMap.height() * $gameMap.tileHeight());
            BlackLights.layer.bottom.width = map_width;
            BlackLights.layer.bottom.height = map_height;
            SceneManager._scene._spriteset._tilemap.addChild( BlackLights.layer.bottom );
            BlackLights.layer.bottom.z = 3;

            // TOP LAYER
            BlackLights.layer.top = new PIXI.Container();
            var map_width = ($gameMap.width() * $gameMap.tileWidth());
            var map_height = ($gameMap.height() * $gameMap.tileHeight());
            BlackLights.layer.top.width = map_width;
            BlackLights.layer.top.height = map_height;
            SceneManager._scene._spriteset._tilemap.addChild( BlackLights.layer.top );
            BlackLights.layer.top.z = 45;

Then i add the images as children's of one of the containers.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/drawing-image-into-specific-layer-solved.103693/