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

Make "export to .vpx" available in the editor #21

Closed
6 of 7 tasks
freezy opened this issue Feb 10, 2020 · 0 comments · Fixed by #42
Closed
6 of 7 tasks

Make "export to .vpx" available in the editor #21

freezy opened this issue Feb 10, 2020 · 0 comments · Fixed by #42
Labels
editor Editor-related changes for Unity enhancement New feature or request unity Concerns the Unity project
Milestone

Comments

@freezy
Copy link
Owner

freezy commented Feb 10, 2020

VPE can write .vpx files, but currently there is no way from the editor to actually do that.

A .vpx file consist of:

  • Table Info (pre-defined and custom key/values)
  • Table Data
  • Other game items
  • Collections
  • Images
  • Sounds
  • Fonts
  • Some meta, like hash and file format version

If we want to read and write data in a consistent way, we need Unity to serialize it so what we want to write is also available runtime and doesn't get lost during reloads.

That means our data classes need to be all [Serializable]. Before writing, we would create a new Table object based on the serialized data, and then use its API to write the .vpx. So what needs to be done:

  • Store table info somewhere on a GameObject
  • Create a component per game item (see flippers and table, where it's somewhat implemented)
  • Store invisible components (like timers) somewhere
  • Somehow store collections
  • Find a way to pull the texture assets back as VPX textures
  • Deal with sounds
  • Deal with fonts (add read and write support already)

To be clear, this means that we create a new .vpx from scratch every time we export (as opposed to taking an existing file and only patching the differences).

@freezy freezy added enhancement New feature or request unity Concerns the Unity project editor Editor-related changes for Unity labels Feb 10, 2020
@freezy freezy added this to the Usable Editor milestone Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Editor-related changes for Unity enhancement New feature or request unity Concerns the Unity project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant