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 Popp08 · Dec 26, 2016 at 03:45 PM · spriteexportpng

Save a map as a PNG file.

Hi everyone, I am working on 2D Platformer right now. I need to save all object (sprite) into a PNG file. Is it possible? For example alt text This is a map I make though the game (in real time). I would like to save it to something like this. alt text

(This picture is not from me. I found it on youtube). Thank.

question.png (24.2 kB)
level-1-1.png (1.4 kB)
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

3 Replies

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

Answer by leocub58 · Apr 21, 2020 at 02:12 AM

https://github.com/leocub58/Tilemap-to-PNG-Unity

I made this asset to export tilemaps as PNGs

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 Popp08 · Apr 23, 2020 at 01:30 PM 0
Share

$$anonymous$$uch appreciate, did not expect someone make an asset for this old post. Thank you! ps. I also subscribe your channel ;)

avatar image
0

Answer by RobAnthem · Dec 26, 2016 at 06:49 PM

Is that a scene, or an Image? Is it Terrain we are looking at, or a custom tile-based map painter? I've been working a lot on In-Editor image editing and it wouldn't be very hard to create something similar, but as an image editor inside the editor. As far as I know, there is no magical way, like in WPF, to serialize a control as an image.

Comment
Add comment · Show 2 · 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 Popp08 · Dec 27, 2016 at 09:43 AM 0
Share

What you see in the first picture is a scene. I want a player to be able make a custom map (build block, character etc.) and save it. I can use XmlSerializer to save all sprite. However, I have see this tutorial (https://www.youtube.com/watch?v=5RzziXSwSsg ) where you can import a png file (by using photoshop) into unity. So if I can "reverse" this, it would make much easier for player to edit it.

avatar image RobAnthem · Dec 28, 2016 at 06:13 AM 0
Share

Well if it a terrain object, it would be pretty easy to iterate heights and colors and store them, if it is a 3d model you can iterate the texture pixels, if it is an image then your work is even easier.

avatar image
0

Answer by SITH-RULER · Dec 27, 2016 at 12:48 PM

guessing you watched quill18's video on "level editor" in unity. the purpose of the video was to show how to use colors to make a image(which you created outside of unity) as a template to build levels which means every color in that image corresponds to a certain gameobject in an array that will be placed on that block of color if you could save the png which you can you would also need a system to convert that images colors into colors which correspond to the colors which are coded in the level editor script which is sorta difficult and confusing but if you just want to take a screenshot and edit it later just use

https://docs.unity3d.com/ScriptReference/Application.CaptureScreenshot.html

hope this helps!

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 Popp08 · Dec 28, 2016 at 05:56 AM 0
Share

Oh! I see your point. Even though I did not want to screenshot. But your explain help me a lot. I guess it is likely not possible to do that. Thank you!

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

8 People are following this question.

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

Related Questions

PNG image in Unity looks very distorted. 1 Answer

Make an Array of Arrays of Textures 1 Answer

Export a png from texture2D 1 Answer

2d game with png sequences slowing on Unity3d 1 Answer

PNG/Sprite Creation Works on PC/Mac But Not On Android 0 Answers


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