Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Spartiate0033 · Mar 29, 2016 at 05:54 AM · save datalevel editor

Custom level editor, looking into architecture and saving/loading methods

Hello community!

I am creating a 2D, isometric cat/mouse game for mobile and I am creating a level editor for the rest of my team to use. This editor will not be available to the public, just the dev team. I've considered purchasing level editors from the asset store but the ones available just aren't a fit for what this game requires. I have done a lot of research into making level editors but I have two questions essentially.

  1. Should I have the level editor in a separate project Unity project, or should it function within the game itself as its own playable scene? Or even as a plugin? I'm more concerned about the architecture and what might be the best option to go for.

  2. I am looking into different saving/loading methods. I have seen some people talk about XML file conversion, or maybe should I simply save the levels as Unity Scenes? LoadAdditive() looks promising, but still not sure about. I am unsure of what level saving method may be the best, so any ideas you have would be appreciated.

Thank you!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Cherno · Mar 29, 2016 at 11:17 AM

(This question might be better suited in the forums)

If you want users to create levels, don't save as Unity scenes since it can't be done at runtime outside of the editor environment. Hence, write a runtime edtitor. Save to file via BinaryFormatter, it doesn'T matter what file format, XML is fine as well as any kind of custom class you serialize.

As for the general environment, I'd take inspiration from existing solutions. My editor has a bar on top of the screen with various buttons that control brush size, snapping, grid size etc. Then, on the left side, I have a scroll area in place that can display various scroll windows: One for terrain editing, one for object editing, one for general map parameters, and so on. The terrain window would have buttons and input fields for the texture used for the selected tile, rotation, and everything else that's important for a terrain tile.

Other special windows can open and close under certain circumstances, like a window that displays all available tile textures.

My editor is selectable as a buiötin feature via the game's main menu; it helps with keeping everything compatible when it comes to classes and data structure. If you have two different projects, you constantly have to worry about all classes having the same classes.

If you are looking into writing your own save and load feature, take a look at my free SerializeHelper:

SerializeHelper - Free save and load utility. (De)Serialize all objects in your scene.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Spartiate0033 · Mar 29, 2016 at 06:46 PM 0
Share

So I checked out your Serializer and it is exactly what I need. Thank you very much for this!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

39 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

User Created Levels, for others to play 1 Answer

internal persistentDataPath with WRITE_EXTERNAL_STORAGE permission 4 Answers

Editor: How to save changes to a ScriptableObject loaded from Resources? 1 Answer

Binary writer not saving game data on iOS builds 1 Answer

How to make a editable text list using external text file 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges