• Unity
  • Services
  • Made with Unity
  • Learn
  • 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
  • Forums
  • Answers
  • Feedback
  • Issue Tracker
  • Blog
  • Evangelists
  • User Groups

Navigation

  • Home
  • Unity
  • Industries
  • Made with Unity
  • Learn
  • Community
    • Forums
    • Answers
    • Feedback
    • Issue Tracker
    • Blog
    • Evangelists
    • User Groups
  • Get Unity
  • Asset Store

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 Mambo4 · Jun 22, 2016 at 05:59 AM · textureimporter

How to set TextureImporter Import Type via script

I Need to set a TextureImporter's "Import Type" value via script. I cannot find the Unity documentation for this parameter. I can only find "TextureType" but that is definitely NOT what I want.

I want to achieve "Texture Type" : "Advanced" and "Import Type" : "Normal Map" as if I had done this in the editor.

Setting TextureImporter.TextureType to "Normal" looses all my other "Advanced" settings

![alt text]screen shot of the unity texture importer inspector[1]

[1]: /storage/temp/72631-textureimporterimporttype.png

textureimporterimporttype.png (20.6 kB)
Comment
Add comment · Show 1
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 saschandroid · Jun 22, 2016 at 06:53 AM 0
Share

I didn't test it, but probably setting

 TextureImporter.normalmap = true;

changes the import type.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Mambo4 · Jun 23, 2016 at 02:11 PM

Thank you, That's the answer

 TextureImporter.textureType = TextureImporterType.Advanced;
  TextureImporter.normalmap = true;


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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

load images in sequence into a gui? 2 Answers

How to skip already imported textures on AssetPostprocessor change? 0 Answers

Creating sprite in code using TextureImporter with C#? 1 Answer

TextureImporter settings not applied 1 Answer

Pausing TextureImporter with a Popup window and waiting for user input 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges