Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by memBrain · Oct 17, 2013 at 01:51 PM · terraintextureing

How to set Terrain Texture via Script?

I have search high and low, both across this UnityAnswers site and the Internet. However creative my searches are, I cannot find a single answer to the simple question: How do I set terrain textures like the inspector using a script?

Let me make this very clear. When your terrain object is selected, from the inspector properties you can click on the paint texture button which opens up your options for painting textures including the edit textures button. Clicking the edit textures button opens up a pop-up window that allows you to set up your SplatPrototype with the options to select your texture, a normal map, and the x, y size and offsets. Upon setting these you are immediately rewarded by seeing your (first) selected texture decorating your terrain.

I have already created a script that allows me to procedurally create my terrain at run-time. Now I want to be able to procedurally paint my terrain in a manner similar to the way setting the properties in the inspector works but through scripts. How do I do this?

As a side question, from what I can gather, it would appear to me that working with terrain objects is one of the poorest documented (and poorest understood) subjects, and yet I see people asking the same questions over and over. Why is this? And why is it that when people create basic terrain tutorials, they always leave out working with one of the most important components, the textures? Almost every tutorial I have found to date that involves working with textures uses the inspector only. Why is that? Does no one know how to script things like terrain texture in Unity? This is very frustrating.

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

0 Replies

· Add your reply
  • Sort: 

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

15 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

Related Questions

Make a simple tree 1 Answer

Using a Gameobject for terrain. 1 Answer

How To produce cracks on terrain and buildings with earthquake ? 0 Answers

accidentally renamed folder, work gone? 2 Answers

Bugs with Terrian. Unity 5.4.0f3 FIXED 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