Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for addObject is unclear #46

Open
mycelia opened this issue Mar 14, 2023 · 1 comment
Open

Documentation for addObject is unclear #46

mycelia opened this issue Mar 14, 2023 · 1 comment
Labels
📄 docs Improvements or additions to documentation 📦 core Stitch Core and CLI

Comments

@mycelia
Copy link

mycelia commented Mar 14, 2023

I'm currently trying to use addObject to add an object. I'm not sure exactly how to format said object, though. Sprites, sounds etc are fairly self-explanatory, but objects are trickier. The current documentation just uses "your/object/name".
Important Facts

  • The function is currently successfully creating a folder inside the asset browser called NEW, but it appears empty in the IDE.
  • The function is also successfully creating an empty folder with the desired object name and a .yy file inside said folder, but it lacks the .gml files
  • I attempted to add my own .gml files to the object folder and then run the function in the hopes this would trigger the object to be visible in the asset folder. This did not work.
  • I assume I need to somehow communicate to the function that the GML files are meant to be attached to the object but I am unsure how to do this and the Intellisense documentation is not clear to me on this front.
  • I am currently attempting to reverse engineer it via the class definitions and trial-and-error but I am new to TypeScript and would greatly appreciate the help!

Current code:

import { StitchProject } from '@bscotch/stitch';

const projectPath = '../';
const myProject = await StitchProject.load({projectPath});

await myProject.addObject('oThree')
@adam-coster adam-coster added 📄 docs Improvements or additions to documentation 📦 core Stitch Core and CLI labels Mar 14, 2023
@mycelia
Copy link
Author

mycelia commented Jan 23, 2024

Update: Running YYPMaker makes the objects visible! Still haven't worked out the GML thing but it's a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 docs Improvements or additions to documentation 📦 core Stitch Core and CLI
Projects
Archived in project
Development

No branches or pull requests

2 participants