Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

createProject - project type

If I use the createProject() call, then I get what appears to be a default AR project (‘Main’ tab with AR default functions and comments; ‘Plane’ tab). Is there a way to set the type of project created? I’d like to just create a standard project (‘Main’ tab only with setup and draw functions as defaults).

Thanks!

Tagged:

Comments

  • dave1707dave1707 Mod
    Posts: 7,155

    @iam3o5am There isn’t an option in createProject() to select which type of project is created. After you create the project, you can change what’s there, so basically you can do it yourself.

  • dave1707dave1707 Mod
    edited October 28 Posts: 7,155

    @iam3o5am Here’s an example. You can change the contents of str to anything you want. This will create a project called abc with the contents of str. You can even setup different strings so you can create different projects with different starting contents.

    function setup()
        projName="abc"
    
    str=[[
    -- Use this function to perform your initial setup
    function setup()
        print("Hello World!")
    end
    
    -- This function gets called once every frame
    function draw()
        -- This sets a dark background color 
        background(40, 40, 50)
    
        -- This sets the line thickness
        strokeWidth(5)
    
        -- Do your drawing here
    
    end]]
    
        createProject(projName)
        saveProjectTab(projName..":Main",str)
    end
    
  • Posts: 57
    Thanks as always, @dave1707 !
Sign In or Register to comment.