Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
8
Question by Fanttum · Jan 17, 2016 at 12:03 AM · editorspriteimportsettingsimport settings

How to Change Default Import Settings?

For example when I import a sprite I don't want to manually set things such as PPU, or filter mode and have them standard across the entire project when I import.

Also is there anyway to change the default settings for the Sprite Editor? If I by default want it to slice something up in a grid can that be done?

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

5 Replies

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

Answer by lassade · Jan 17, 2016 at 05:22 AM

Yes its possible! you need to write a AssetImporter and put inside any Editor folder http://docs.unity3d.com/ScriptReference/AssetImporter.html

see this for an example: http://www.sarpersoher.com/a-custom-asset-importer-for-unity/

Comment
Add comment · Show 3 · 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 Fanttum · Jan 17, 2016 at 06:51 PM 0
Share

Thanks! Still not sure how to change the Sprite Editor stuff for multiple sprites. Any tips on how to do that automatically? For Example by default I would like it so splice the sheet up into a 1024x1024 grid with the pivot on the bottom of each one.

avatar image tomekkie2 · Dec 06, 2016 at 12:21 PM 0
Share

Here is a good example of import setting manager. You can just rewrite it or supplement it to support more types of assets. http://wiki.unity3d.com/index.php/$$anonymous$$odelImporterPreset$$anonymous$$anager

avatar image Shadoninja · May 05, 2018 at 01:50 AM 0
Share

Great share. Clearly-commented and also outlined the simplicity of custom import settings. Another +1 for Unity!

avatar image
23

Answer by daniel254973 · Jul 16, 2018 at 10:50 AM

With new Unity Presets (2018.1) all the answers are deprecated.

You can change default import settings with it.

Presets

PresetManager

Comment
Add comment · Show 4 · 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 RChrispy · Jun 11, 2019 at 04:57 PM 0
Share

Use Presets to specify default properties for new components and Asset importers. You cannot set the default properties for Project settings , Preferences settings or native Assets such as $$anonymous$$aterials, Animations or SpriteSheets.

Seems like for that you still have to use the source from above: source

avatar image RChrispy RChrispy · Nov 24, 2019 at 06:08 PM 1
Share

Okay just for the guys com$$anonymous$$g here later my quote of the reference above is obsolete.

If you have added a default Preset into the Preset$$anonymous$$anager you have to select the assets (if already imported) and hit reset. Reimport won't do anything. Also I would suggest using this script here if you need different settings for different folders: https://docs.unity3d.com/$$anonymous$$anual/DefaultPresetsByFolder.html

avatar image jhocking · May 26, 2020 at 01:53 PM 0
Share

oh cool, I didn't know about Presets, this looks super useful for what I'm working on. There's one import setting for FBX models (Convert Units is normally on, but I need that off for how scaling is applied) that I need to change for all models.

avatar image markv12 · Aug 20, 2020 at 03:41 PM 0
Share

Here's a video showing how to use the preset system to setup default import settings: https://www.youtube.com/watch?v=RXDS0mAhtKw

avatar image
5

Answer by shieldgenerator7 · Nov 20, 2021 at 11:45 AM

Here's a step-by-step guide on how to do this with the Unity Preset Manager:

alt text alt text

  1. Setup a sprite with the settings you want, then click the Presets button

  2. Press "Save current to..." and save your preset. I named mine "TextureImporterPNG.preset"

  3. Go to "Edit->Project Settings..." and select "Preset Manager" on the list on the left

  4. Click "Add Default Preset"

  5. Search for "texture"

  6. Select "TextureImporter"

  7. In the filter box, type glob:"*.png"

  8. In the Preset box: click and drag your saved texture preset from step 2 into the Preset box

You're done!

Note: You may have to delete the .meta files of already imported PNGs if you want to have them reimported with these default settings.


unity-answer-import-3.png (83.5 kB)
unity-answer-import-1.png (34.2 kB)
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 lucasjohansson · Feb 20 at 04:07 PM 0
Share

Nice solution! I'm trying to get this to work on generated lightmaps, but to no success. The lightmap textures get default settings, but if I right-click and "Reset", my values appear, letting me know I've got it correct set up in Preset Manager, they just don't apply on automatically on generated lightmaps.. Have you got that to work in some way?

avatar image
0

Answer by Krahazik · Oct 05, 2017 at 03:15 PM

@tomekkie2 @Iassade I am getting several errors with the script and I do not know how to fix them.

Using this script - http://www.sarpersoher.com/a-custom-asset-importer-for-unity/

 Assets/Scripts/AssetImporter.cs(41,12): error CS1502: The best overloaded method match for `UnityEditor.TextureImporter.SetPlatformTextureSettings(string, int, UnityEditor.TextureImporterFormat, bool)' has some invalid arguments
 
 Assets/Scripts/AssetImporter.cs(42,101): error CS1503: Argument `#4' cannot convert `int' expression to type `bool'
 

How can I edit the script to effect the Materials import settings (Material Naming and Material Search) for an imported asset to use 'From Model's Material' and 'Project-Wide'?

I also just tried using the script linked by @tomekkie2 but there were errors with that script as well. Stuff about deprecieted functions or something.

Comment
Add comment · 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
0

Answer by SweatyChair · Dec 07, 2017 at 02:25 AM

There's also plugin for people who don't code:

https://assetstore.unity.com/packages/tools/utilities/defaulter-custom-importer-defaults-beta-77952

Comment
Add comment · 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

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

54 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 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

Editor script to slice sprites 4 Answers

Save generated Texture2D as Texture type Sprite 1 Answer

When to use Generate Lightmap UV? 0 Answers

How to stop gradient banding? 2 Answers

Change an object's import settings in the editor 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