what does #Import "shaders/@/shaders" do?

About Monkey 2 Forums Monkey 2 Programming Help what does #Import "shaders/@/shaders" do?

This topic contains 1 reply, has 2 voices, and was last updated by  Mark Sibly 2 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5101

    codifies
    Participant

    saw it in mojo’s shader class, but what’s it do?

    #5114

    Mark Sibly
    Keymaster

    This copies the assets in the ‘shaders’ dir to an output ‘shaders’ assets subdir.

    Any import asset path that contains ‘@/’ will copy the asset(s) to the left of ‘@/’ to the dest asset dir after ‘/@’, eg: “Import “myimage.png@/images” will import ‘myimage.png’ to ‘images’ subdir in assets. You can then load it with LoadImage( “asset::images/myimage.png” )

    Any src asset path that ends with ‘/’ refers to an entire dir, eg: #Import “images/” will import all assets in ‘images’ dir to root assets dir, while #Import “images/@/images” will copy images dir to images subdir.

    There is still some work to do here  – I need to add file filters etc – and there will probably be a ‘nicer’ way to do this eventually, but it works for now.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.